Comparing version 8.0.13 to 8.0.14
@@ -1,2 +0,2 @@ | ||
import { Cookie } from '@wdio/protocols'; | ||
import type { Cookie } from '@wdio/protocols'; | ||
import type DevToolsDriver from '../devtoolsdriver'; | ||
@@ -3,0 +3,0 @@ /** |
@@ -92,3 +92,4 @@ import { _keyDefinitions } from 'puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.js'; | ||
const keyboardFn = page.mouse[cmd].bind(page.mouse); | ||
let { x, y, duration, button, origin } = singleAction; | ||
const { duration, button, origin } = singleAction; | ||
let { x, y } = singleAction; | ||
if (cmd === 'move') { | ||
@@ -95,0 +96,0 @@ /** |
@@ -54,3 +54,3 @@ import { ELEMENT_KEY } from '../constants.js'; | ||
*/ | ||
let getFrames = page.frames || page.childFrames; | ||
const getFrames = page.frames || page.childFrames; | ||
const childFrames = await getFrames.apply(page); | ||
@@ -57,0 +57,0 @@ const childFrame = childFrames[id]; |
@@ -7,3 +7,3 @@ import type { Browser } from 'puppeteer-core/lib/cjs/puppeteer/api/Browser'; | ||
import ElementStore from './elementstore.js'; | ||
import { ActiveListener } from './types.js'; | ||
import type { ActiveListener } from './types.js'; | ||
export default class DevToolsDriver { | ||
@@ -10,0 +10,0 @@ commands: Record<string, Function>; |
@@ -29,3 +29,3 @@ import fs from 'node:fs'; | ||
!file.endsWith('.d.ts')))); | ||
for (let filename of files) { | ||
for (const filename of files) { | ||
const commandName = path.basename(filename, path.extname(filename)); | ||
@@ -112,3 +112,7 @@ if (!commandName) { | ||
if (typeof this.commands[command] !== 'function') { | ||
return () => { throw new Error(`Command "${command}" is not yet implemented`); }; | ||
return () => { | ||
throw new Error(`Command "${command}" is not supported using the Devtools protocol. ` + | ||
'You might want to use WebDriver as automation engine. For more ' + | ||
'information check out https://webdriver.io/docs/automationProtocols!'); | ||
}; | ||
} | ||
@@ -222,3 +226,3 @@ /** | ||
const pageloadTimeout = this.timeouts.get('pageLoad'); | ||
const pageloadTimeoutReached = pageloadTimeout != null | ||
const pageloadTimeoutReached = typeof pageloadTimeout !== 'undefined' | ||
? Date.now() - pendingNavigationStart > pageloadTimeout | ||
@@ -225,0 +229,0 @@ : false; |
@@ -8,3 +8,3 @@ export default class ElementStore { | ||
this._elementMap.set(index, elementHandle); | ||
const frame = elementHandle.executionContext()['_world']?.frame(); | ||
const frame = elementHandle.executionContext()._world?.frame(); | ||
if (frame) { | ||
@@ -11,0 +11,0 @@ let elementIndexes = this._frameMap.get(frame); |
@@ -91,3 +91,3 @@ /* istanbul ignore file */ | ||
const edgeExecRegex = '^Exec=/.*/(edge)-.*'; | ||
let installations = []; | ||
const installations = []; | ||
if (canAccess(folder)) { | ||
@@ -94,0 +94,0 @@ let execPaths; |
@@ -77,3 +77,3 @@ /* istanbul ignore file */ | ||
const edgeExecRegex = '^Exec=/.*/(firefox)-.*'; | ||
let installations = []; | ||
const installations = []; | ||
if (canAccess(folder)) { | ||
@@ -80,0 +80,0 @@ let execPaths; |
@@ -21,3 +21,3 @@ import os from 'node:os'; | ||
const params = validateConfig(DEFAULTS, options); | ||
if (params.logLevel && (!options.logLevels || !options.logLevels['devtools'])) { | ||
if (params.logLevel && (!options.logLevels || !options.logLevels.devtools)) { | ||
logger.setLevel('devtools', params.logLevel); | ||
@@ -24,0 +24,0 @@ } |
@@ -26,4 +26,4 @@ import { launch as launchChromeBrowser } from 'chrome-launcher'; | ||
*/ | ||
let ignoreDefaultArgs = capabilities.ignoreDefaultArgs || devtoolsOptions.ignoreDefaultArgs; | ||
let headless = chromeOptions.headless || devtoolsOptions.headless; | ||
const ignoreDefaultArgs = capabilities.ignoreDefaultArgs || devtoolsOptions.ignoreDefaultArgs; | ||
const headless = chromeOptions.headless || devtoolsOptions.headless; | ||
if (typeof mobileEmulation.deviceName === 'string') { | ||
@@ -174,4 +174,4 @@ const deviceProperties = KnownDevices[mobileEmulation.deviceName]; | ||
*/ | ||
if (!process.env.PROGRAMFILES && process.env['ProgramFiles']) { | ||
process.env.PROGRAMFILES = process.env['ProgramFiles']; | ||
if (!process.env.PROGRAMFILES && process.env.ProgramFiles) { | ||
process.env.PROGRAMFILES = process.env.ProgramFiles; | ||
} | ||
@@ -178,0 +178,0 @@ const programFiles86 = process.env['ProgramFiles(X86)'] || process.env['ProgramFiles(x86)']; |
/// <reference types="node" /> | ||
import { EventEmitter } from 'node:events'; | ||
import type { EventEmitter } from 'node:events'; | ||
import type { Options, Capabilities } from '@wdio/types'; | ||
import type { ProtocolCommandsAsync } from '@wdio/protocols'; | ||
import { LaunchOptions, BrowserLaunchArgumentOptions, BrowserConnectOptions, ConnectOptions } from 'puppeteer-core'; | ||
import { EventEmitter as PuppeteerEventEmitter } from 'puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js'; | ||
import type { LaunchOptions, BrowserLaunchArgumentOptions, BrowserConnectOptions, ConnectOptions } from 'puppeteer-core'; | ||
import type { EventEmitter as PuppeteerEventEmitter } from 'puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js'; | ||
export interface ExtendedCapabilities extends Capabilities.Capabilities, WDIODevtoolsOptions { | ||
@@ -8,0 +8,0 @@ } |
@@ -1,3 +0,3 @@ | ||
import { CommandParameters, CommandPathVariables, ElementReference } from '@wdio/protocols'; | ||
import { Options } from 'chrome-launcher'; | ||
import type { CommandParameters, CommandPathVariables, ElementReference } from '@wdio/protocols'; | ||
import type { Options } from 'chrome-launcher'; | ||
import type { Logger } from '@wdio/logger/build/node'; | ||
@@ -4,0 +4,0 @@ import type { ElementHandle } from 'puppeteer-core/lib/cjs/puppeteer/common/ElementHandle'; |
{ | ||
"name": "devtools", | ||
"version": "8.0.13", | ||
"version": "8.0.14", | ||
"description": "A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer", | ||
@@ -38,11 +38,11 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"@types/ua-parser-js": "^0.7.33", | ||
"@wdio/config": "8.0.13", | ||
"@wdio/logger": "8.0.0", | ||
"@wdio/config": "8.0.14", | ||
"@wdio/logger": "8.0.14", | ||
"@wdio/protocols": "8.0.0", | ||
"@wdio/types": "8.0.11", | ||
"@wdio/utils": "8.0.13", | ||
"@wdio/types": "8.0.14", | ||
"@wdio/utils": "8.0.14", | ||
"chrome-launcher": "^0.15.0", | ||
"edge-paths": "^2.1.0", | ||
"import-meta-resolve": "^2.1.0", | ||
"puppeteer-core": "19.4.0", | ||
"puppeteer-core": "19.4.1", | ||
"query-selector-shadow-dom": "^1.0.0", | ||
@@ -57,3 +57,3 @@ "ua-parser-js": "^1.0.1", | ||
}, | ||
"gitHead": "912db21d2cd4552a02b776ba74cae05440b076de" | ||
"gitHead": "ab58bc79c1df2e146d02a68ee444766ec371e6d2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
227728
4118
+ Added@wdio/config@8.0.14(transitive)
+ Added@wdio/logger@8.0.14(transitive)
+ Added@wdio/types@8.0.14(transitive)
+ Added@wdio/utils@8.0.14(transitive)
+ Addedpuppeteer-core@19.4.1(transitive)
+ Addedws@8.11.0(transitive)
- Removed@wdio/config@8.0.13(transitive)
- Removed@wdio/logger@8.0.0(transitive)
- Removed@wdio/types@8.0.11(transitive)
- Removed@wdio/utils@8.0.13(transitive)
- Removedpuppeteer-core@19.4.0(transitive)
- Removedws@8.10.0(transitive)
Updated@wdio/config@8.0.14
Updated@wdio/logger@8.0.14
Updated@wdio/types@8.0.14
Updated@wdio/utils@8.0.14
Updatedpuppeteer-core@19.4.1