codeceptjs 3.7.5-beta.17 → 3.7.5-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/helper/WebDriver.js +6 -3
- package/package.json +1 -1
package/lib/helper/WebDriver.js
CHANGED
|
@@ -491,7 +491,7 @@ class WebDriver extends Helper {
|
|
|
491
491
|
}
|
|
492
492
|
config.capabilities.browserName = config.browser || config.capabilities.browserName
|
|
493
493
|
|
|
494
|
-
// WebDriver Bidi Protocol. Default:
|
|
494
|
+
// WebDriver Bidi Protocol. Default: true
|
|
495
495
|
config.capabilities.webSocketUrl = config.bidiProtocol ?? config.capabilities.webSocketUrl ?? true
|
|
496
496
|
|
|
497
497
|
config.capabilities.browserVersion = config.browserVersion || config.capabilities.browserVersion
|
|
@@ -629,8 +629,11 @@ class WebDriver extends Helper {
|
|
|
629
629
|
|
|
630
630
|
this.browser.on('dialog', () => {})
|
|
631
631
|
|
|
632
|
-
|
|
633
|
-
this.browser.
|
|
632
|
+
// Check for Bidi, because "sessionSubscribe" is an exclusive Bidi protocol feature. Otherwise, error will be thrown.
|
|
633
|
+
if (this.browser.capabilities && this.browser.capabilities.webSocketUrl) {
|
|
634
|
+
await this.browser.sessionSubscribe({ events: ['log.entryAdded'] })
|
|
635
|
+
this.browser.on('log.entryAdded', logEvents)
|
|
636
|
+
}
|
|
634
637
|
|
|
635
638
|
return this.browser
|
|
636
639
|
}
|