galen icon indicating copy to clipboard operation
galen copied to clipboard

Reusing existing Browser session

Open dhapolapankaj opened this issue 8 years ago • 2 comments

Hello Team,

I came across a scenario where I need to reuse an existing browser session and then perform Galen checks. I came across various article to perform the checks. I was able to extract SessionID and WebDriver Listerner URL. Please refer below blog. http://tarunlalwani.com/post/reusing-existing-browser-session-selenium-java/

I realized that we would require to override the HttpCommandExecutor.execute() function

I tried this in our script "*.test.js" file, but it seems to be kind of complicated situation here.

Can you please provide any suggestion?

Thanks PD

dhapolapankaj avatar Mar 15 '18 04:03 dhapolapankaj

putting session id to desired capabilities could be a way. http://galenframework.com/docs/reference-galen-javascript-api/#createGridDriver.

Give it a try, if it doesn't work, code implementation may be needed on Galen JS API end.

cyildirim avatar Mar 23 '18 11:03 cyildirim

Hey @cyildirim , Please correct if my understanding is incorrect. When we start any driver, The driver start listening at a specific port. To hack into existing browser session, we use RemoteWebDriver and connect to it, irrespective of the type of driver. Although I have not tried your approach. since I was able to find a workaround to use pure java class file.

Thanks PD

dhapolapankaj avatar Apr 15 '18 12:04 dhapolapankaj