Example #1
0
        public void TestTryGetCorrectElement()
        {
            var element = new Mock<IWebElement>(MockBehavior.Strict);

            var nativePage = new NativePage { MyControl = element.Object };
            var page = new SeleniumPage(nativePage);


            IPropertyData propertyData;
            var result = page.TryGetElement("MyControl", out propertyData);

            Assert.IsNotNull(nativePage.MyControl);
            Assert.AreEqual(true, result);
            Assert.IsNotNull(propertyData);
        }
Example #2
0
        public void TestTryGetCorrectElement()
        {
            var element = new Mock <IWebElement>(MockBehavior.Strict);

            var nativePage = new NativePage {
                MyControl = element.Object
            };
            var page = new SeleniumPage(nativePage, null);


            IPropertyData propertyData;
            var           result = page.TryGetElement("MyControl", out propertyData);

            Assert.IsNotNull(nativePage.MyControl);
            Assert.AreEqual(true, result);
            Assert.IsNotNull(propertyData);
        }