ull*_*ark 5 c# webdriver specflow selenium-webdriver
我正在尝试使用Specflow和Firefox使Selenium 2.4.0接受Javascript生成的"Confirm-Dialog".我在下面的步骤中找不到我应该做的事情.(尝试从各种Java实现中找到在.NET中执行此操作的等效方法,但它无法正常工作)
When I click "Delete" on the App
And I confirm the warning
Run Code Online (Sandbox Code Playgroud)
步骤定义......
[When(@"I confirm the warning")]
public void WhenIConfirmTheWarning()
{
// WebDriver.Something?
}
Run Code Online (Sandbox Code Playgroud)
Jim*_*ans 10
在.NET绑定中确认警报的方法如下:
driver.SwitchTo().Alert().Accept();
Run Code Online (Sandbox Code Playgroud)
我使用Firefox 5.0使用Selenium .NET绑定2.4.0.