public void AlertTest() { RunInAllBrowsers(browser => { browser.NavigateToUrl("/Alert.aspx"); browser.First("#button").Click(); AssertUI.CheckIfAlertTextEquals(browser, "confirm test"); }); }
public void AlertTest2() { RunInAllBrowsers(browser => { browser.NavigateToUrl("/Alert.aspx"); browser.First("#button").Click(); try { AssertUI.CheckIfAlertTextEquals(browser, "Confirm test", true); } catch (AlertException) { } }); }