To be clear, the question about re-attaching existing selenium browser sessions has been asked before and answered. My use case is slightly different. I want to initiate a browser session independently of Selenium, then have Selenium take over after a certain step. To do that, I'd need to "attach" the driver object somehow. All solutions I have seen so far require a sessionid which (as far as I could tell) is generated by Selenium when initiating the session. I am using Python (3.7) and internet explorer as the browser.
Asked
Active
Viewed 42 times
0
-
@DebanjanB I took pains to clearly illustrate that this question is NOT answered on SO. Please read through the text again where I clearly mention that I am not looking to reattach a disconnected session but a session opened through something other than Selenium. Would appreciate if you could change the state back to Open. – jawsnnn Jun 06 '19 at 16:06
-
It isn't clear from your question what you have tried neither there's any code trials. Perhaps _...a session opened through something other than Selenium..._ earlier is pretty much equivalent to _previous session_. Have you gone through the duplicate target for once? – undetected Selenium Jun 06 '19 at 16:11
-
Let me try to explain the situation again: The solutions you have linked do not provide a way to do what I want to do. Everything I have seen so far uses a session-id to "re-connect" - which generated by Selenium when the session is initiated - which is missing because in my case the session was NOT initiated by Selenium. In other words, I am trying to connect, not re-connect. This is not a duplicate question by any criteria which means you should reopen it. – jawsnnn Jun 06 '19 at 17:38
-
1The answer is no. Only the application that launched the browser can hook into it. At least that is supposed to be true... I suppose an exploit could use some kind of memory injection or something? – pcalkins Jun 06 '19 at 18:33