Skip to content

Commit 1c1cb80

Browse files
committed
enhance check
1 parent b9a0232 commit 1c1cb80

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

java/src/org/openqa/selenium/devtools/CdpEndpointFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static Optional<URI> getReportedUri(Capabilities caps) {
9191
break;
9292
case "firefox":
9393
key = "moz:debuggerAddress";
94-
if (!(Boolean) caps.getCapability("webSocketUrl")) {
94+
if (!caps.is("webSocketUrl")) {
9595
LOG.warning(
9696
"CDP support for Firefox is deprecated and will be removed in future versions. "
9797
+ "Please switch to WebDriver BiDi.");

java/src/org/openqa/selenium/firefox/FirefoxDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private FirefoxDriver(
165165
Optional<URI> reportedUri =
166166
CdpEndpointFinder.getReportedUri("moz:debuggerAddress", capabilities);
167167

168-
if (reportedUri.isPresent() && !(Boolean) capabilities.getCapability("webSocketUrl")) {
168+
if (reportedUri.isPresent() && !capabilities.is("webSocketUrl")) {
169169
LOG.warning(
170170
"CDP support for Firefox is deprecated and will be removed in future versions. "
171171
+ "Please switch to WebDriver BiDi.");

0 commit comments

Comments
 (0)