public void AlertTest4() { RunInAllBrowsers(browser => { browser.NavigateToUrl("/Alert.aspx"); browser.First("#button").Click(); AssertUI.CheckIfAlertText(browser, s => s.EndsWith("test"), "alert text doesn't end with 'test.'"); }); }
public void ExpectedExceptionTest2() { ExpectException(typeof(AlertException)); RunInAllBrowsers(browser => { browser.NavigateToUrl("/Alert.aspx"); browser.First("#button").Click(); AssertUI.CheckIfAlertText(browser, s => s.EndsWith("test."), "alert text doesn't end with 'test.'"); }); }
public void ExpectedExceptionTest() { try { RunInAllBrowsers(browser => { browser.NavigateToUrl("/Alert.aspx"); browser.First("#button").Click(); AssertUI.CheckIfAlertText(browser, s => s.EndsWith("test."), "alert text doesn't end with 'test.'"); }); } catch (Exception e) { var message = e.ToString(); if (!message.Contains("confirm test")) { throw; } } }