예제 #1
0
 private void AssertXenonActionThrowsWithMessage(
     Func <BaseXenonTest <T>, XenonElementsFinderTestCase, BaseXenonTest <T> > xenonAction,
     XenonElementsFinderTestCase testCase)
 {
     using (var browserTest = CreateBrowserTest())
     {
         var browser   = CreateInstance(browserTest.Start());
         var exception = Assert.Throws <NoElementsFoundException>(() => xenonAction(browser, testCase));
         Assert.True(testCase.SearchIdentifiers.All(x => exception.Message.Contains(x)));
     }
 }
예제 #2
0
 public void RightClickNonExistentElement_IncludesTextInException(XenonElementsFinderTestCase testCase)
 {
     AssertXenonActionThrowsWithMessage((x, tc) => x.RightClick(tc.SearchCriteria), testCase);
 }