0

I am trying to reconnect a webdriver to an existing intance of Internet Explorer. After reading I was informed that With internet-explorer, it's possible to iterate over the open windows in the OS and find the right IE process to attach to (1).

But I can't get such feature to work. I believe this is a Watin feature only from reading (2).

Is such feature possible with selenium?

(1) How can I reconnect to the browser opened by webdriver with selenium?

(2)https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/18

Edit : I am working in RPA, our main tool is Blue Prism. Now I would love to be able to use selenium inside Blue Prism. But to do so, I would need to re-attach to a browser. I manage to reattach using the sessionID and URI, but it only work while the instance of the first code execution is still running (I believe once the code stop, the garbage collector clear the sessionID and it cant reattach). I need to acces it from another code stage.

I was thinking of running procces in the background to keep my selenium driver alive and reattach to it. Then when I am done, I could kill such process.

Edit2: If someone is looking for code exemple on how to reattach using sessionID and URI, you can follow this tutorial

https://tarunlalwani.com/post/reusing-existing-browser-session-selenium-csharp/

Scyther312
  • 53
  • 1
  • 5
  • Code trials? Any errors? – undetected Selenium Mar 09 '20 at 21:54
  • When you open the browser store it's SessionID... you won't need to iterate. (Not sure why you'd do this though, can you explain why you want to reconnect to the browser? Does your driver crash?) – pcalkins Mar 09 '20 at 22:38
  • I have seen some discussion in other old threads but none of it has any code example. I suggest you try to provide detailed information about your issue. Inform us why you want to reconnect the web driver and what code did you try to achieve it. It can help to understand the issue properly. – Deepak-MSFT Mar 10 '20 at 01:51

0 Answers0