While clicking the drop down, Selenium IDE records a selectWindow command as SelectWindow=null
. What is the equivalent code in webdriver/java ? I tried driver.switchto.window("null");
but on trying it I get "no such window" exception.
Vince Bowdren
6233 silver badges17 bronze badges
1 Answer 1
You mentioned "the" dropdown, without much details, I can not tell what happens exactly.
- Does a window pop out?
- Does an alert pop out?
- Does a dropdown list expand?
What you can do is to:
- Before you click this button, execute something like
String Parent_Window = driver.getWindowHandle();
this way, you can store your parent window handle in a string for later use. - Click this button.
- Execute
driver.getWindowHandles()
, this way, you will get a list of all active window handles. - Go through this window handle list, do what you want to do.
Without much further details, this is as much as I can help.
answered Aug 15, 2016 at 21:17
default