I’ve tried to handle a specific PopUp / new Window in Java with SeleniumServer but it just doesn’t work.
I’ve done:
selenium.click("css=a[title=\"Some irrelevant title\"] > div.text");
Thread.sleep(5000);
for (String s : selenium.getAllWindowNames()) {
if (s.contains("_blank")) {
selenium.selectWindow("name=" + s);
selenium.windowMaximize();
}
}
But it doesn’t recognize the new window. If I use getAllWindowIDsor names or titles, it just returns one, the primary window.
If I use selenium.waitForPopUp("foobar", "9999") it fails after the timeout, that is why I use a regular Thread.sleep().
What else can I do?
This can help: