Reputation: 1811
I am using the Selenium Builder Firefox plugin to generate my acceptance tests and I need to confirm certain actions that prompt a confirm
dialog.
Is it possible to instruct Selenium Builder to click on the "OK" or the "Cancel" buttons?
Upvotes: 0
Views: 397
Reputation: 350
Alert alert = driver.switchTo().alert();
//Getting alert text alert.getText();
alert.accept(); // Clicking OK Button
alert.dismiss(); // Clicking Cancel Button
Upvotes: 1