tebeka / selenium

Selenium/Webdriver client for Go
MIT License
2.53k stars 409 forks source link

Connect with existing sessionID #148

Open klausenbusk opened 5 years ago

klausenbusk commented 5 years ago

We use selenium with Geckodriver and if our Go program for whatever reason crash, we need a way to delete the existing session.

selenium currently lacks a functions which create a WebDriver from a existing sessionID.

minusnine commented 5 years ago

Creating a selenium.WebDriver instance for an existing session is slightly intrusive right now as it requires some refactoring, but I do want to provide it.

In the meantime, I've committed selenium.DeleteSession, which is a free-function to delete a session without having to call selenium.NewRemote.

https://godoc.org/github.com/tebeka/selenium#DeleteSession

mohanraj-r commented 5 years ago

I am also looking for the feature to create a WebDriver instance from an existing sessionID which was created by other means outside of the tebeka/selenium lib.

stephenWeeksEECoder commented 4 years ago

Is there a way to connect to an existing session by just changing the SessionID parameter? Would this work? We also would like to be able to connect to an already existing selenium session.