public void TestWaitForControlNotEnabled() { var element = new Mock <IWebElement>(MockBehavior.Strict); element.SetupGet(e => e.Enabled).Returns(false); var nativePage = new NativePage(); var page = new SeleniumPage(nativePage, null); var result = page.WaitForElement(element.Object, WaitConditions.NotEnabled, null); Assert.IsTrue(result); element.VerifyAll(); }
public void TestWaitForControlExpectExistButIsNot() { var element = new Mock <IWebElement>(MockBehavior.Strict); element.SetupGet(e => e.Displayed).Returns(false); var nativePage = new NativePage(); var page = new SeleniumPage(nativePage, null); var result = page.WaitForElement(element.Object, WaitConditions.Exists, null); Assert.IsFalse(result); element.VerifyAll(); }
public void TestWaitForControlNotEnabled() { var element = new Mock<IWebElement>(MockBehavior.Strict); element.SetupGet(e => e.Enabled).Returns(false); var nativePage = new NativePage(); var page = new SeleniumPage(nativePage); var result = page.WaitForElement(element.Object, WaitConditions.NotEnabled, null); Assert.IsTrue(result); element.VerifyAll(); }
public void TestWaitForControlExpectExistButIsNot() { var element = new Mock<IWebElement>(MockBehavior.Strict); element.SetupGet(e => e.Displayed).Returns(false); var nativePage = new NativePage(); var page = new SeleniumPage(nativePage); var result = page.WaitForElement(element.Object, WaitConditions.Exists, null); Assert.IsFalse(result); element.VerifyAll(); }