Page 1 of 1

Chrome driver behaving weird, please help

Posted: 18 Nov 2019, 05:43
by ankitkraken

Code: Select all

ChromeGet(IP_Port := "127.0.0.1:9222") {
     
     driver := ComObjCreate("Selenium.CHROMEDriver") ;Chrome driver
     
     driver.SetCapability("debuggerAddress", IP_Port)
     driver.Start()
     
     return driver
}
I'm using this code to link selenium to an already running instance of chrome. But when a drag a tab out of the chrome window to create a new window of chrome and then run the script to define driver := ChromeGet(), the driver gets linked to the New chrome window. Doesn't matter which window/tab is active, driver always gets linked to the new window. Can someone explain why this is happening?

Thanks