public void ByPartialHref_Many_Matches() { SetUp(); var pageLinks = Driver.FindElements(ByExtension.PartialHref("page")); Assert.AreEqual(4, pageLinks.Count); }
public void ByPartialHref_One_Match() { SetUp(); var page1Link = Driver.FindElement(By.LinkText("Page 2")); var resultElement = Driver.FindElement(ByExtension.PartialHref("/test/page2")); Assert.AreEqual(page1Link, resultElement); }
public void ByPartialHref_Entire_Href() { SetUp(); var page1Link = Driver.FindElement(By.LinkText("Page 1")); var resultElement = Driver.FindElement(ByExtension.PartialHref("https://dmdiehr.github.io/test/page1")); Assert.AreEqual(page1Link, resultElement); }
public void Not_Visible_Exception_Caught() { SetUp("edge", 59000, "https://kwaylz.kavi.com/higherlogic/mm/account#/accounts"); var username = new PageElement(By.Id("username")); var password = new PageElement(By.Id("password")); var loginButton = new PageElement(ByExtension.AttributeValue("value", "Login")); username.Clear(); username.SendKeys("*****@*****.**"); password.Click(); password.Clear(); password.SendKeys("Tester1319"); loginButton.Click(); var logoutButton = new PageElement(ByExtension.PartialHref("logout")); logoutButton.Click(); }