Skip to content

Commit aca918b

Browse files
authored
EdgeOptions.useWebView to return "this" (#14157)
* EdgeOptions.useWebView to return this All ChromiumOptions methods return `this` This commit makes EdgeOptions.useWebView behave the same as other Options methods * update javadoc
1 parent 0814580 commit aca918b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ public EdgeOptions() {
6161
* automation of WebView2 apps with Microsoft Edge WebDriver </a>
6262
*
6363
* @param enable boolean flag to enable or disable the 'webview2' usage
64+
* @return this {@link EdgeOptions} object with added WebView2 capability
6465
*/
65-
public void useWebView(boolean enable) {
66+
public EdgeOptions useWebView(boolean enable) {
6667
String browserName = enable ? WEBVIEW2_BROWSER_NAME : EDGE.browserName();
6768
setCapability(CapabilityType.BROWSER_NAME, browserName);
69+
return this;
6870
}
6971

7072
@Override

0 commit comments

Comments
 (0)