1

I am trying to connect selenium to an existing session by doing the following:

ce = 'some url'
session_id = 'some value'

driver = webdriver.Firefox()
driver = webdriver.Remote(command_executor=ce,desired_capabilities={})
driver.session_id = session_id

I get a long error message ending with:

[WinError 10061] No connection could be made because the target machine actively refused it

I took my code from the top answer in Can Selenium interact with an existing browser session? However, my execution of it seems to raise an error not discussed in the original question.

EDIT: I solved my problem by saving and reusing browser cookies instead. While this does not answer the original question, it provided a solution to my particular problem. It was about not needing to log into websites.

  • Does this answer your question? [Can Selenium interact with an existing browser session?](https://stackoverflow.com/questions/8344776/can-selenium-interact-with-an-existing-browser-session) – kol Jul 23 '20 at 08:15
  • It is where i got my non working code – smart_beaver Jul 23 '20 at 08:15
  • Then please indicate this clearly in your question. – kol Jul 23 '20 at 08:18

0 Answers0