I am using Firefox 11 + WebDriver 2.21.0 / WebDriver 2.22.0 (tried both).
In my scenario, when I click on a tab, it opens a confirmation box and on clicking OK
it starts loading the new tab from server.
So I'm handling this scenario as:
driver.findElement(By.id("myTab")).click();
driver.switchTo().alert().accept();
but after it clicks on "mytab", it waits for window to load indefinitely. So it is not coming on alert.accept()
and browser waits to accept the confirmation dialog to load the new page, so I end up in a deadlock condition.
This code works well in Internet Explorer.
Please help, how to deal the situation?