Skip to content

Commit b129205

Browse files
pujaganipull[bot]
authored andcommitted
[java] Remove deprecated method usage for WebDriverInfo implementations
1 parent 79e162e commit b129205

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

java/src/org/openqa/selenium/chrome/ChromeDriverInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public Optional<WebDriver> createDriver(Capabilities capabilities)
7373
return Optional.empty();
7474
}
7575

76-
WebDriver driver = new ChromeDriver(capabilities);
76+
WebDriver driver = new ChromeDriver(new ChromeOptions().merge(capabilities));
7777

7878
return Optional.of(driver);
7979
}

java/src/org/openqa/selenium/edge/EdgeDriverInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ public Optional<WebDriver> createDriver(Capabilities capabilities)
8080
return Optional.empty();
8181
}
8282

83-
return Optional.of(new EdgeDriver(capabilities));
83+
return Optional.of(new EdgeDriver(new EdgeOptions().merge(capabilities)));
8484
}
8585
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ public Optional<WebDriver> createDriver(Capabilities capabilities)
9292
return Optional.empty();
9393
}
9494

95-
return Optional.of(new FirefoxDriver(capabilities));
95+
return Optional.of(new FirefoxDriver(new FirefoxOptions().merge(capabilities)));
9696
}
9797
}

java/src/org/openqa/selenium/ie/InternetExplorerDriverInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ public Optional<WebDriver> createDriver(Capabilities capabilities)
7676
return Optional.empty();
7777
}
7878

79-
return Optional.of(new InternetExplorerDriver(capabilities));
79+
return Optional.of(new InternetExplorerDriver(new InternetExplorerOptions().merge(capabilities)));
8080
}
8181
}

java/src/org/openqa/selenium/safari/SafariDriverInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ public Optional<WebDriver> createDriver(Capabilities capabilities)
8282
return Optional.empty();
8383
}
8484

85-
return Optional.of(new SafariDriver(capabilities));
85+
return Optional.of(new SafariDriver(new SafariOptions().merge(capabilities)));
8686
}
8787
}

0 commit comments

Comments
 (0)