I'm trying to make Selenium 2.4.0 Accept a Javascript generated "Confirm-Dialog", using Specflow and Firefox. I'm having trouble finding what I should do in my step below. (Tried to find an equivalent way of doing it in .NET from various Java implementations, but it isn't working)
When I click "Delete" on the App
And I confirm the warning
Step definition...
[When(@"I confirm the warning")]
public void WhenIConfirmTheWarning()
{
// WebDriver.Something?
}
The way to confirm the alert in the .NET bindings is as follows:
driver.SwitchTo().Alert().Accept();
I have had this working with the Selenium .NET bindings 2.4.0, using Firefox 5.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With