seleniumselenium-webdriverwebdrivercommunication

Can Selenium interact with an existing browser session?


Does anybody know if Selenium (WebDriver preferably) is able to communicate with and act through a browser that is already running before launching a Selenium Client?

I mean if Selenium is able to comunicate with a browser without using the Selenium Server (with could be an Internet Explorer launched manually for example).


Solution

  • This is a pretty old feature request: Allow webdriver to attach to a running browser. So it's officially not supported.

    However, there is some working code which claims to support this: https://web.archive.org/web/20171214043703/http://tarunlalwani.com/post/reusing-existing-browser-session-selenium-java/.