|
50 | 50 | import org.openqa.selenium.interactions.Interactive;
|
51 | 51 | import org.openqa.selenium.interactions.Sequence;
|
52 | 52 | import org.openqa.selenium.internal.Require;
|
53 |
| -import org.openqa.selenium.json.Json; |
54 |
| -import org.openqa.selenium.json.JsonException; |
55 | 53 | import org.openqa.selenium.logging.LocalLogs;
|
56 | 54 | import org.openqa.selenium.logging.LogType;
|
57 | 55 | import org.openqa.selenium.logging.LoggingHandler;
|
|
62 | 60 | import org.openqa.selenium.remote.http.ClientConfig;
|
63 | 61 | import org.openqa.selenium.remote.http.ConnectionFailedException;
|
64 | 62 | import org.openqa.selenium.remote.http.HttpClient;
|
65 |
| -import org.openqa.selenium.remote.http.HttpMethod; |
66 |
| -import org.openqa.selenium.remote.http.HttpRequest; |
67 |
| -import org.openqa.selenium.remote.http.HttpResponse; |
68 | 63 | import org.openqa.selenium.remote.internal.WebElementToJsonConverter;
|
69 | 64 | import org.openqa.selenium.remote.tracing.TracedHttpClient;
|
70 | 65 | import org.openqa.selenium.remote.tracing.Tracer;
|
|
99 | 94 | import static org.openqa.selenium.remote.CapabilityType.LOGGING_PREFS;
|
100 | 95 | import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME;
|
101 | 96 | import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_JAVASCRIPT;
|
102 |
| -import static org.openqa.selenium.remote.http.Contents.string; |
103 | 97 |
|
104 | 98 | @Augmentable
|
105 | 99 | public class RemoteWebDriver implements WebDriver,
|
@@ -311,20 +305,6 @@ public Capabilities getCapabilities() {
|
311 | 305 | return capabilities;
|
312 | 306 | }
|
313 | 307 |
|
314 |
| - public static Status status(URL remoteAddress) { |
315 |
| - HttpResponse response = new HttpResponse(); |
316 |
| - try (HttpClient client = HttpClient.Factory.createDefault().createClient(remoteAddress)) { |
317 |
| - HttpRequest request = new HttpRequest(HttpMethod.GET, "/status"); |
318 |
| - response = client.execute(request); |
319 |
| - Map<String, Object> responseMap = new Json().toType(string(response), Map.class); |
320 |
| - Map<String, Object> value = (Map<String, Object>) responseMap.get("value"); |
321 |
| - |
322 |
| - return new Status((boolean) value.get("ready"), (String) value.get("message")); |
323 |
| - } catch (JsonException e) { |
324 |
| - throw new WebDriverException("Unable to parse remote response: " + string(response), e); |
325 |
| - } |
326 |
| - } |
327 |
| - |
328 | 308 | @Override
|
329 | 309 | public void get(String url) {
|
330 | 310 | execute(DriverCommand.GET(url));
|
|
0 commit comments