public void NoFrameTest() { var elementActions = new ElementActions(Driver); Driver.Url = "https://demoqa.com/nestedframes"; var element = elementActions.FindElement(By.XPath("//div[@class='main-header']")); Assert.AreEqual("Nested Frames", element.Text, "The element text didn't match."); }
public void BadElementTest() { var elementActions = new ElementActions(Driver); Driver.Url = "https://demoqa.com/nestedframes"; var element = elementActions.FindElement(By.XPath("//div[@class='false-header']")); Assert.IsNull(element, "The element object wasn't null."); }
public void NestedChildFrameTest() { var elementActions = new ElementActions(Driver); Driver.Url = "https://demoqa.com/nestedframes"; var element = elementActions.FindElement(By.XPath("//p")); Assert.AreEqual("Child Iframe", element.Text, "The element text didn't match."); }