public void ElementContained_NoElement() { RunInAllBrowsers(browser => { browser.NavigateToUrl("ElementContained.aspx"); AssertUI.CheckIfNotContainsElement(browser.First("#no"), "span"); }); }
public void ElementContained_OneElement_ExpectedFailure() { try { RunInAllBrowsers(browser => { browser.NavigateToUrl("ElementContained.aspx"); AssertUI.CheckIfNotContainsElement(browser.First("#one"), "span"); }); } catch (Exception ex) { if (ex.Message.Contains("children")) { throw; } } }
public void ElementContained_TwoElement_ExpectedFailure() { try { RunInAllBrowsers(browser => { browser.NavigateToUrl("ElementContained.aspx"); AssertUI.CheckIfNotContainsElement(browser.First("#two"), "span"); }); } catch (Exception ex) { var message = ex.ToString(); if (!message.Contains("children") || !message.Contains("2")) { throw; } } }