Is your feature request related to a problem? Please describe.
Selenium 4.0 (now in Beta) supports proxying CDP Requests across Grid.
It would be nice if we could use the WebdriverIO Devtools Service to run those commands against a Selenium 4.0 Grid.
Describe the solution you'd like
When providing a remote machine in the config, such as:
runner: 'local',
hostname: 'my.grid.ip',
port: 4444,
And providing the devtools service
I should be able to call commands in my test like:
browser.cdp('Browser', 'getVersion')
Describe alternatives you've considered
n/a
Additional context
I'm happy to take a shot at this PR if you'd accept it. I believe the change will occur in here:
|
browserURL: `http://${chromiumOptions.debuggerAddress}` |
this.puppeteer = await puppeteer.connect({
- browserURL: `http://${chromiumOptions.debuggerAddress}`,
+ browserWSEndpoint: `ws://${this.config.hostname}:${this.config.port}/session/${this.sessionId}/se/cdp`,
})
Of course with some conditionals added depending on if
- User provided a custom debuggerAddress
- Whether a local run or a remote host/port is being used
- If it's Remote, check if it's a Selenium 4.0 Grid that accepts those commands (can probably look at returned capabilities, which exposes this endpoint)
Is your feature request related to a problem? Please describe.
Selenium 4.0 (now in Beta) supports proxying CDP Requests across Grid.
It would be nice if we could use the WebdriverIO Devtools Service to run those commands against a Selenium 4.0 Grid.
Describe the solution you'd like
When providing a remote machine in the config, such as:
And providing the devtools service
I should be able to call commands in my test like:
Describe alternatives you've considered
n/a
Additional context
I'm happy to take a shot at this PR if you'd accept it. I believe the change will occur in here:
webdriverio/packages/webdriverio/src/commands/browser/getPuppeteer.ts
Line 58 in 26772cd
Of course with some conditionals added depending on if