$switchToWindow() not working on Chrome browser
LuizOli opened this issue · comments
Operating System
Windows 10
Selenium Server version (selenium-server-standalone-3.0.1.jar etc.)
4.0.0-alpha-2
Browser version (firefox 50.1.0, chrome 54.0.2840.100 (64-bit) etc.)
Chrome - 87.0.4280.88
Expected behaviour
client$switchToWindow(WindowId= xx)
Should switch the window/tab focus
Actual behaviour
It does not
Steps to reproduce the behaviour
Just load up the package and try to switch tabs on Chrome
I got it to switch the window by manualy using the $queryRD method from the client class and changing the qdata to list(handle = "the tab to focus")
cliente$queryRD(
sprintf(
"%s/session/%s/window",
cliente$serverURL,
cliente$sessionInfo[["id"]]
),
"POST",
qdata = list(handle = "acctual tab handle id")
)
the original method has the qdata payload set "name" instead of "handle".
I did it like this and it worked (for chrome):
cliente$queryRD(
sprintf(
"%s/session/%s/window",
cliente$serverURL,
cliente$sessionInfo[["id"]]
),
"POST",
qdata = list(name= "acctual tab handle id")
)