I want to select the current window,frame or popup where my browser is pointing. (i.e when i doubleclick or click it opens an popup or window) I want to get through that window or popup using selenium webdriver.So if possible please suggest me how to do it. Thanks in advance.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
To switch to new pop up window what you can do is the following:
This will switch you to the new window opened. If you need to switch to the other window just switch to currentWindow.
Hope this helps.
You can use the following code also to handle popup.
Hope this will help :)
As an alternative you can try this,
Make sure to add some delay after switching to next popup, Thread.sleep(5000);