Skip to content

Commit

Permalink
[java] Avoid augmenting CDP for Firefox (#15271)
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani authored Feb 11, 2025
1 parent ad9c5cb commit 4faf5ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
8 changes: 0 additions & 8 deletions java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ public static Optional<URI> getReportedUri(Capabilities caps) {
case "msedge":
key = "ms:edgeOptions";
break;
case "firefox":
key = "moz:debuggerAddress";
if (!caps.is("webSocketUrl")) {
LOG.warning(
"CDP support for Firefox is deprecated and will be removed in future versions. "
+ "Please switch to WebDriver BiDi.");
}
break;
default:
return Optional.empty();
}
Expand Down
1 change: 0 additions & 1 deletion java/src/org/openqa/selenium/firefox/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ java_export(
deps = [
"//java:auto-service",
"//java/src/org/openqa/selenium/bidi",
"//java/src/org/openqa/selenium/devtools/v85",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/manager",
"//java/src/org/openqa/selenium/remote",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,13 @@ public URL getUrl() {
SESSION_ID,
"capabilities",
new ImmutableCapabilities(
"firefox", "caps",
"browserName", "firefox",
"moz:debuggerAddress", uri.toString())))));
"chrome", "caps",
"browserName", "chrome",
"goog:chromeOptions", uri.toString())))));

WebDriver driver =
RemoteWebDriver.builder()
.oneOf(new FirefoxOptions())
.oneOf(new ChromeOptions())
.withDriverService(service)
.augmentUsing(new Augmenter())
.connectingWith(config -> req -> response)
Expand Down

0 comments on commit 4faf5ba

Please sign in to comment.