Skip to content

Commit

Permalink
[java] Simplifying condition
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
diemol committed Mar 16, 2023
1 parent 084465b commit d8474fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions java/src/org/openqa/selenium/remote/RemoteWebDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,7 @@ private void checkNonW3CCapabilities(Capabilities capabilities) {

private void checkChromeW3CFalse(Capabilities capabilities) {
// Throwing warnings when the user sets `w3c: false` inside `goog:chromeOptions`
if ("chrome".equalsIgnoreCase(capabilities.getBrowserName()) &&
capabilities.asMap().containsKey("goog:chromeOptions")) {
if (Browser.CHROME.is(capabilities) && capabilities.asMap().containsKey("goog:chromeOptions")) {
Object capability = capabilities.getCapability("goog:chromeOptions");
boolean w3c = true;
if ((capability instanceof Map)) {
Expand Down

0 comments on commit d8474fb

Please sign in to comment.