Comparing version 8.29.7 to 8.30.0
@@ -22,5 +22,5 @@ "use strict"; | ||
*/ | ||
static async reloadSession(instance) { | ||
static async reloadSession(instance, newCapabilities) { | ||
const Devtools = (await import('../index.js')).default; | ||
return Devtools.reloadSession(instance); | ||
return Devtools.reloadSession(instance, newCapabilities); | ||
} | ||
@@ -27,0 +27,0 @@ static get Devtools() { |
@@ -14,3 +14,3 @@ import type { Options } from '@wdio/types'; | ||
*/ | ||
static reloadSession(instance: any): Promise<string>; | ||
static reloadSession(instance: Client, newCapabilities: WebdriverIO.Capabilities): Promise<string>; | ||
/** | ||
@@ -17,0 +17,0 @@ * allows user to attach to existing sessions |
@@ -81,5 +81,8 @@ import os from 'node:os'; | ||
*/ | ||
static async reloadSession(instance) { | ||
static async reloadSession(instance, newCapabilities) { | ||
const { session } = sessionMap.get(instance.sessionId); | ||
const browser = await launch(instance.requestedCapabilities); | ||
const browser = await launch({ | ||
...instance.requestedCapabilities, | ||
...(newCapabilities || {}) | ||
}); | ||
const pages = await browser.pages(); | ||
@@ -86,0 +89,0 @@ session.initBrowser.call(session, browser, pages); |
@@ -6,2 +6,3 @@ /// <reference types="node" resolution-mode="require"/> | ||
import type { LaunchOptions, BrowserLaunchArgumentOptions, BrowserConnectOptions, ConnectOptions } from 'puppeteer-core'; | ||
import type { Browser } from 'puppeteer-core/lib/esm/puppeteer/api/Browser.js'; | ||
import type { EventEmitter as PuppeteerEventEmitter } from 'puppeteer-core/lib/esm/puppeteer/common/EventEmitter.js'; | ||
@@ -39,2 +40,3 @@ declare global { | ||
export interface Client extends BaseClient, ProtocolCommands { | ||
puppeteer: Browser; | ||
} | ||
@@ -41,0 +43,0 @@ /** |
{ | ||
"name": "devtools", | ||
"version": "8.29.7", | ||
"version": "8.30.0", | ||
"description": "A Chrome DevTools protocol binding that maps WebDriver commands into Chrome DevTools commands using Puppeteer", | ||
@@ -42,7 +42,7 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"@types/node": "^20.1.0", | ||
"@wdio/config": "8.29.3", | ||
"@wdio/config": "8.30.0", | ||
"@wdio/logger": "8.28.0", | ||
"@wdio/protocols": "8.29.7", | ||
"@wdio/types": "8.29.1", | ||
"@wdio/utils": "8.29.3", | ||
"@wdio/types": "8.30.0", | ||
"@wdio/utils": "8.30.0", | ||
"chrome-launcher": "^1.0.0", | ||
@@ -60,5 +60,5 @@ "edge-paths": "^3.0.5", | ||
"@types/uuid": "^9.0.0", | ||
"@wdio/globals": "8.29.7" | ||
"@wdio/globals": "8.30.0" | ||
}, | ||
"gitHead": "1c7195268663df56856494c69d7bd655c834a368" | ||
"gitHead": "033e2a91e97c9bd060eb70f2e4e412d382bec3af" | ||
} |
Sorry, the diff of this file is not supported yet
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
234390
4296
+ Added@wdio/config@8.30.0(transitive)
+ Added@wdio/types@8.30.0(transitive)
+ Added@wdio/utils@8.30.0(transitive)
- Removed@wdio/config@8.29.3(transitive)
- Removed@wdio/types@8.29.1(transitive)
- Removed@wdio/utils@8.29.3(transitive)
Updated@wdio/config@8.30.0
Updated@wdio/types@8.30.0
Updated@wdio/utils@8.30.0