Example #1
0
        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();
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }
Example #4
0
        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();
        }