Skip to content

Commit

Permalink
[java] do not need to check for non-w3c capability javascriptEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 8, 2023
1 parent 023a0d5 commit 42796da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions java/src/org/openqa/selenium/Capabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ default String getBrowserVersion() {
default boolean is(String capabilityName) {
Object cap = getCapability(capabilityName);
if (cap == null) {
// If it's not set explicitly, javascriptEnabled is true.
return "javascriptEnabled".equals(capabilityName);
return false;
}
return cap instanceof Boolean ? (Boolean) cap : Boolean.parseBoolean(String.valueOf(cap));
}
Expand Down

0 comments on commit 42796da

Please sign in to comment.