The instruction here:
http://www.thoughtworks-studios.com/twist/2.3/help/how_do_i_handle_popup_in_selenium2.html
say “In Selenium 2(WebDriver), testing popup windows involve switching the driver to the popup window and then running the corresponding actions. “
I am using the selenium IDE to build and run my test cases.
Where exactly do I put the above java code?
I cannot modify the source code myself but I can do whatever I want in Selenium.
The code that is mentioned in the link – it’s pure Java. You don’t need to do any modifications of your site JavaScript if you want to switch between windows. You can do do any test automation using WebDriver library.
browseris an instance ofWebDriverclass and it hasswitchTo()method. In other binding languages (C#, Ruby, Python) there are similar methods for the same purpose.