示例#1
0
 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.'");
     });
 }
示例#2
0
 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.'");
     });
 }
示例#3
0
 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;
         }
     }
 }