0

I have two windows default, working on second window. Here I have clicked on some link which opens another window. Now I am trying to shift my focus to this opened window, but unable to focus it. Initially I have taken Set <String> obj1=driver.getWindowHandles(); which have two values. After clicking on link I have taken another set as Set <String> obj2=driver.getWindowHandles();

In the for each loop I am adding the strings of the obj2 to obj1, if the obj2 is added then I am writing the code line as driver.switchTo().window(obj2-- which is added) but I am getting error like this..

"Error message: org.openqa.selenium.WebDriverException: unknown error: DevTools returned unknown type:webview
  (Session info: chrome=43.0.2357.65)
  (Driver info: chromedriver=2.7.236900,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 9 milliseconds"

Can anyone help me out?

1
  • Can you try debugging this? Is the newest window handle actually being passed to the switchTo method? May 26, 2015 at 13:55

2 Answers 2

0

Though I have never faced this issue, it seems familiar. I saw this error message returned on one of my friend's test script. I then searched and found the following links

Link1

Link2

My friend's issue got resolved after he followed advice given in 2. You can try the resolutions mentioned.

1
  • Yes this error is due to version problem mostly, because it works with FF browser. I haven't checked with chrome browser because I need to downgrade the version.
    – Bunny
    May 27, 2015 at 8:09
0

This is due an old ChromeDriver version, check and update the ChromeDriver to the newest version here http://chromedriver.storage.googleapis.com/index.html?path=2.19/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.