Comparing version 6.10.10 to 6.10.11
@@ -127,3 +127,3 @@ "use strict"; | ||
} | ||
async checkPendingNavigations(pendingNavigationStart) { | ||
async checkPendingNavigations(pendingNavigationStart = Date.now()) { | ||
let page = this.getPageHandle(); | ||
@@ -133,4 +133,2 @@ if (this.activeDialog || !page) { | ||
} | ||
pendingNavigationStart = pendingNavigationStart || Date.now(); | ||
const pageloadTimeout = this.timeouts.get('pageLoad') || 0; | ||
if (!page.mainFrame) { | ||
@@ -143,9 +141,12 @@ const pages = await this.browser.pages(); | ||
} | ||
const pageloadTimeoutReached = (Date.now() - pendingNavigationStart) > pageloadTimeout; | ||
const executionContext = await page.mainFrame().executionContext(); | ||
const pageloadTimeout = this.timeouts.get('pageLoad'); | ||
const pageloadTimeoutReached = pageloadTimeout != null | ||
? Date.now() - pendingNavigationStart > pageloadTimeout | ||
: false; | ||
try { | ||
const executionContext = await page.mainFrame().executionContext(); | ||
await executionContext.evaluate('1'); | ||
const readyState = await executionContext.evaluate('document.readyState'); | ||
if (readyState !== 'complete' && !pageloadTimeoutReached) { | ||
return this.checkPendingNavigations(pendingNavigationStart); | ||
if (readyState === 'complete' || pageloadTimeoutReached) { | ||
return; | ||
} | ||
@@ -157,6 +158,7 @@ } | ||
} | ||
return this.checkPendingNavigations(pendingNavigationStart); | ||
} | ||
await new Promise(resolve => setTimeout(resolve, Math.min(100, typeof pageloadTimeout === 'number' ? pageloadTimeout / 10 : 100))); | ||
await this.checkPendingNavigations(pendingNavigationStart); | ||
} | ||
} | ||
exports.default = DevToolsDriver; |
{ | ||
"name": "devtools", | ||
"version": "6.10.10", | ||
"version": "6.10.11", | ||
"description": "A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer", | ||
@@ -28,6 +28,6 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
"@types/uuid": "^8.3.0", | ||
"@wdio/config": "6.10.10", | ||
"@wdio/config": "6.10.11", | ||
"@wdio/logger": "6.10.10", | ||
"@wdio/protocols": "6.10.6", | ||
"@wdio/utils": "6.10.10", | ||
"@wdio/utils": "6.10.11", | ||
"chrome-launcher": "^0.13.1", | ||
@@ -42,3 +42,3 @@ "edge-paths": "^2.1.0", | ||
}, | ||
"gitHead": "23272f7cd1ef7cd660d2eb6136d26b10b2b5104d" | ||
"gitHead": "92508043cacac4e2945ba1f599b25b48e8694b62" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136581
2465
+ Added@wdio/config@6.10.11(transitive)
+ Added@wdio/utils@6.10.11(transitive)
- Removed@wdio/config@6.10.10(transitive)
- Removed@wdio/utils@6.10.10(transitive)
Updated@wdio/config@6.10.11
Updated@wdio/utils@6.10.11