public void Chrome_MobileDriver_ClickLink(EnumPhoneType phone, bool touch) { ratDriver = new RatDriver <ChromeDriver>(phone, touch); ratDriver.NavigateToPage(WebsiteToTest); Assert.IsTrue(ratDriver.GetBrowserWindowUrl().Contains(WebsiteUrl)); var devLink = ratDriver.FindElementByXPath(".//*[@id='just-intro']/div/div/div[1]/a"); Assert.IsTrue(ratDriver.ElementExists(devLink)); ratDriver.ClickLinkAndWait(devLink); Assert.IsTrue(ratDriver.GetBrowserWindowUrl().Contains("developments")); ratDriver.ClosePagesAndQuitDriver(); }
public void Chrome_MobileDriver_ClickMenu(EnumPhoneType phone, bool touch) { ratDriver = new RatDriver <ChromeDriver>(phone, touch); ratDriver.NavigateToPage(WebsiteToTest); Assert.IsTrue(ratDriver.GetBrowserWindowUrl().Contains(WebsiteUrl)); var buttonLink = ratDriver.FindElementByXPath("html/body/div[1]/div/div[1]/button"); Assert.IsTrue(ratDriver.ElementExists(buttonLink)); ratDriver.ClickLink(buttonLink); var devLink = ratDriver.FindElementByXPath("html/body/div[1]/div/div[2]/ul/li[2]/a"); ratDriver.ClickLinkAndWait(devLink); Assert.IsTrue(ratDriver.GetBrowserWindowUrl().Contains("developments")); ratDriver.ClosePagesAndQuitDriver(); }