rubycdp / ferrum

Headless Chrome Ruby API
https://ferrum.rubycdp.com
MIT License
1.7k stars 122 forks source link

Attach to selenoid-grid created browser sessions #348

Closed LukeIGS closed 1 year ago

LukeIGS commented 1 year ago

Background:

Recently selenium and Selenoid split off on how they wish to support cdp. This gem seems to have a good springboard for attaching to existing Selenoid chrome sessions over the devtools endpoint, and I've been trying to figure out what all changes would be necessary for this. I noticed that the gem itself will not stand up a process if it detects that there is an existing web socket and selenoid does expose a web socket endpoint per the following spec https://github.com/aerokube/selenoid/blob/master/docs/devtools.adoc

Proposal

Add a way to specify a websocket to attach to at spin up to bypass kickstarting a process.

Findings

So far i've attempted this and have found that passing the selenoid endpoint errors out as they do not support /json/version I've stood up an issue with them asking if they would be willing to add support for it. https://github.com/aerokube/selenoid/issues/1322

LukeIGS commented 1 year ago

Seems this is mostly on selenoid's side, going to close this for now..