Skip to content

Commit c590e3a

Browse files
committed
fix: bidi error wdio
1 parent 8c1017f commit c590e3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/helper/WebDriver.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ let browserLogs = []
3535
* @type {object}
3636
* @prop {string} url - base url of website to be tested.
3737
* @prop {string} browser - Browser in which to perform testing.
38+
* @prop {boolean} [bidiProtocol=false] - WebDriver Bidi Protocol. Default: false. More info: https://webdriver.io/docs/api/webdriverBidi/
3839
* @prop {string} [basicAuth] - (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
3940
* @prop {string} [host=localhost] - WebDriver host to connect.
4041
* @prop {number} [port=4444] - WebDriver port to connect.
@@ -489,7 +490,8 @@ class WebDriver extends Helper {
489490
}
490491
config.capabilities.browserName = config.browser || config.capabilities.browserName
491492

492-
config.capabilities.webSocketUrl = config.webSocketUrl || config.capabilities.webSocketUrl || true
493+
// WebDriver Bidi Protocol. Default: false
494+
config.capabilities.webSocketUrl = config.bidiProtocol ?? config.capabilities.webSocketUrl ?? true
493495

494496
config.capabilities.browserVersion = config.browserVersion || config.capabilities.browserVersion
495497
if (config.capabilities.chromeOptions) {

0 commit comments

Comments
 (0)