Selenium automatycznie akceptuje alerty

Czy ktoś wie, jak to wyłączyć? Lub jak uzyskać tekst z alertów, które zostały automatycznie zaakceptowane?

Ten kod musi działać,

driver.findElement(By.xpath("//button[text() = \"Edit\"]")).click();//causes page to alert() something
Alert alert = driver.switchTo().alert();
alert.accept();
return alert.getText();

ale zamiast tego podaje ten błąd

No alert is present (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.14 seconds

Używam FF 20 z Selenium 2.32

questionAnswers(4)

yourAnswerToTheQuestion