Ejemplo n.º 1
0
        public void TestGetElementAttributeValueWithValidAttribute()
        {
            var element = new Mock <IWebElement>(MockBehavior.Strict);

            element.Setup(e => e.GetAttribute("href")).Returns("http://myurl.com/page");

            var nativePage = new NativePage();
            var page       = new SeleniumPage(nativePage, null);

            var result = page.GetElementAttributeValue(element.Object, "href");

            Assert.AreEqual("http://myurl.com/page", result);

            element.VerifyAll();
        }
Ejemplo n.º 2
0
        public void TestGetElementAttributeValueWithValidAttribute()
        {
            var element = new Mock<IWebElement>(MockBehavior.Strict);
            element.Setup(e => e.GetAttribute("href")).Returns("http://myurl.com/page");

            var nativePage = new NativePage();
            var page = new SeleniumPage(nativePage);

            var result = page.GetElementAttributeValue(element.Object, "href");

            Assert.AreEqual("http://myurl.com/page", result);

            element.VerifyAll();
        }