1

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.

asked Aug 15, 2016 at 20:21

1 Answer 1

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:

  1. 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.
  2. Click this button.
  3. Execute driver.getWindowHandles(), this way, you will get a list of all active window handles.
  4. 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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.