Ejemplo n.º 1
0
        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.");
        }
Ejemplo n.º 2
0
        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.");
        }
Ejemplo n.º 3
0
        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.");
        }