(urlTemplate string)
| 248 | } |
| 249 | |
| 250 | func (wd *remoteWD) stringCommand(urlTemplate string) (string, error) { |
| 251 | url := wd.requestURL(urlTemplate, wd.id) |
| 252 | response, err := wd.execute("GET", url, nil) |
| 253 | if err != nil { |
| 254 | return "", err |
| 255 | } |
| 256 | |
| 257 | reply := new(struct{ Value *string }) |
| 258 | if err := json.Unmarshal(response, reply); err != nil { |
| 259 | return "", err |
| 260 | } |
| 261 | |
| 262 | if reply.Value == nil { |
| 263 | return "", fmt.Errorf("nil return value") |
| 264 | } |
| 265 | |
| 266 | return *reply.Value, nil |
| 267 | } |
| 268 | |
| 269 | func voidCommand(method, url string, params interface{}) error { |
| 270 | if params == nil { |
no test coverage detected