Skip to content

Commit

Permalink
[java] Revert - Add status endpoint
Browse files Browse the repository at this point in the history
This reverts commit 0a2a4a9.

Feature did not reach a team consensus, hence reverting this
change #10832
  • Loading branch information
diemol committed Aug 5, 2022
1 parent b1c2700 commit ad02160
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 179 deletions.
20 changes: 0 additions & 20 deletions java/src/org/openqa/selenium/remote/RemoteWebDriver.java
Expand Up @@ -50,8 +50,6 @@
import org.openqa.selenium.interactions.Interactive;
import org.openqa.selenium.interactions.Sequence;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.json.Json;
import org.openqa.selenium.json.JsonException;
import org.openqa.selenium.logging.LocalLogs;
import org.openqa.selenium.logging.LogType;
import org.openqa.selenium.logging.LoggingHandler;
Expand All @@ -62,9 +60,6 @@
import org.openqa.selenium.remote.http.ClientConfig;
import org.openqa.selenium.remote.http.ConnectionFailedException;
import org.openqa.selenium.remote.http.HttpClient;
import org.openqa.selenium.remote.http.HttpMethod;
import org.openqa.selenium.remote.http.HttpRequest;
import org.openqa.selenium.remote.http.HttpResponse;
import org.openqa.selenium.remote.internal.WebElementToJsonConverter;
import org.openqa.selenium.remote.tracing.TracedHttpClient;
import org.openqa.selenium.remote.tracing.Tracer;
Expand Down Expand Up @@ -99,7 +94,6 @@
import static org.openqa.selenium.remote.CapabilityType.LOGGING_PREFS;
import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME;
import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_JAVASCRIPT;
import static org.openqa.selenium.remote.http.Contents.string;

@Augmentable
public class RemoteWebDriver implements WebDriver,
Expand Down Expand Up @@ -311,20 +305,6 @@ public Capabilities getCapabilities() {
return capabilities;
}

public static Status status(URL remoteAddress) {
HttpResponse response = new HttpResponse();
try (HttpClient client = HttpClient.Factory.createDefault().createClient(remoteAddress)) {
HttpRequest request = new HttpRequest(HttpMethod.GET, "/status");
response = client.execute(request);
Map<String, Object> responseMap = new Json().toType(string(response), Map.class);
Map<String, Object> value = (Map<String, Object>) responseMap.get("value");

return new Status((boolean) value.get("ready"), (String) value.get("message"));
} catch (JsonException e) {
throw new WebDriverException("Unable to parse remote response: " + string(response), e);
}
}

@Override
public void get(String url) {
execute(DriverCommand.GET(url));
Expand Down
36 changes: 0 additions & 36 deletions java/src/org/openqa/selenium/remote/Status.java

This file was deleted.

This file was deleted.

76 changes: 0 additions & 76 deletions java/test/org/openqa/selenium/remote/WebDriverStatusTest.java

This file was deleted.

0 comments on commit ad02160

Please sign in to comment.