()
| 610 | } |
| 611 | |
| 612 | func (wd *remoteWD) CurrentURL() (string, error) { |
| 613 | url := wd.requestURL("/session/%s/url", wd.id) |
| 614 | response, err := wd.execute("GET", url, nil) |
| 615 | if err != nil { |
| 616 | return "", err |
| 617 | } |
| 618 | reply := new(struct{ Value *string }) |
| 619 | if err := json.Unmarshal(response, reply); err != nil { |
| 620 | return "", err |
| 621 | } |
| 622 | |
| 623 | return *reply.Value, nil |
| 624 | } |
| 625 | |
| 626 | func (wd *remoteWD) Get(url string) error { |
| 627 | requestURL := wd.requestURL("/session/%s/url", wd.id) |