Comparing version 6.1.8 to 6.1.9
@@ -17,2 +17,13 @@ "use strict"; | ||
if (id === null && typeof page.parentFrame === 'function') { | ||
let parentFrame = await page.parentFrame(); | ||
while (parentFrame) { | ||
parentFrame = await parentFrame.parentFrame(); | ||
} | ||
this.currentFrame = parentFrame; | ||
return null; | ||
} | ||
if (typeof id[_constants.ELEMENT_KEY] === 'string') { | ||
@@ -37,3 +48,3 @@ const elementHandle = this.elementStore.get(id[_constants.ELEMENT_KEY]); | ||
let getFrames = page.frames || page.childFrames; | ||
const childFrames = await getFrames(); | ||
const childFrames = await getFrames.apply(page); | ||
const childFrame = childFrames[id]; | ||
@@ -49,14 +60,3 @@ | ||
if (id === null && typeof page.parentFrame === 'function') { | ||
let parentFrame = await page.parentFrame(); | ||
while (parentFrame) { | ||
parentFrame = await page.parentFrame(); | ||
} | ||
this.currentFrame = parentFrame; | ||
return null; | ||
} | ||
throw new Error(`Could not switch frame, unknwon id: ${id}`); | ||
} |
@@ -12,3 +12,3 @@ "use strict"; | ||
var _DeviceDescriptors = _interopRequireDefault(require("puppeteer-core/DeviceDescriptors")); | ||
var _DeviceDescriptors = require("puppeteer-core/DeviceDescriptors"); | ||
@@ -32,3 +32,3 @@ var _logger = _interopRequireDefault(require("@wdio/logger")); | ||
const log = (0, _logger.default)('devtools'); | ||
const DEVICE_NAMES = Object.values(_DeviceDescriptors.default).map(device => device.name); | ||
const DEVICE_NAMES = Object.values(_DeviceDescriptors.devicesMap).map(device => device.name); | ||
@@ -41,3 +41,3 @@ async function launchChrome(capabilities) { | ||
if (typeof mobileEmulation.deviceName === 'string') { | ||
const deviceProperties = Object.values(_DeviceDescriptors.default).find(device => device.name === mobileEmulation.deviceName); | ||
const deviceProperties = Object.values(_DeviceDescriptors.devicesMap).find(device => device.name === mobileEmulation.deviceName); | ||
@@ -44,0 +44,0 @@ if (!deviceProperties) { |
{ | ||
"name": "devtools", | ||
"version": "6.1.8", | ||
"version": "6.1.9", | ||
"description": "A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer", | ||
@@ -45,3 +45,3 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
}, | ||
"gitHead": "2f7008522802d2b15705fb300aa93c544e0af405" | ||
"gitHead": "21539bb965e87df2df5ae4971cc7ce826a538582" | ||
} |
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
83923