Skip to content

Instantly share code, notes, and snippets.

@rajsaggi
rajsaggi / gist:3f2be16a03f75be830e4212f2bceccac
Created December 12, 2016 16:52
Attach to IE browser not spawned by selenium
I wanted to automate the LoadRunner scripting as the workflows are large and needs changes with every build, my plan is to launch the IE brouswer using vugen and then start a selenium script for the same workflow and attach the webdriver with the running browser of vugen. This will help me record the flow in LoadRunner. I see a post that this is possible with Selenium2 but so far i could not able to do so, I tried with
CODE:
for (String handle : driver.getWindowHandles()) {
driver.switchTo().window(handle);
}
but this is returning the connection key of the browser launched by WebDriver and not the browser which is already opened by LoadRunner.
Any help on this will be highly appreciated. Thanks.Rajarshee