Selenium - Modal dialog present - how to accept information? Selenium - Modal dialog present - how to accept information? selenium selenium

Selenium - Modal dialog present - how to accept information?


I found a solution by following code:

IAlert alert = driver.SwitchTo().Alert();alert.Accept();

It works for me.


In java:

Alert alert = m_driver.switchTo().alert(); alert.accept();