예제 #1
0
        public void HoverByTest()
        {
            var elementActions = new ElementActions(Driver);

            Driver.Url = "http://the-internet.herokuapp.com/";
            elementActions.Click(By.XPath("//a[text()='Hovers']"));
            Assert.IsFalse(elementActions.IsDisplayed(By.XPath("//h5[text()='name: user1']")), "The specified text isn't displayed.");
            elementActions.Hover(By.XPath("//div[@class='figure'][1]"));
            Assert.IsTrue(elementActions.IsDisplayed(By.XPath("//h5[text()='name: user1']")), "The specified text isn't displayed.");
        }
예제 #2
0
        public void IframeIWebelementTest()
        {
            var elementActions = new ElementActions(Driver);

            Driver.Url = "http://the-internet.herokuapp.com/";
            elementActions.Click(By.XPath("//a[text()='Frames']"));
            elementActions.Click(By.XPath("//li/a[text()='iFrame']"));
            Assert.IsFalse(elementActions.IsDisplayed(By.Id("tinymce")), "The specified text isn't displayed.");
            elementActions.SwitchToFrame(Driver.FindElement(By.Id("mce_0_ifr")));
            Assert.IsTrue(elementActions.IsDisplayed(By.Id("tinymce")), "The specified text isn't displayed.");
        }
예제 #3
0
        public void IsDisplayedIWebElementTest()
        {
            var elementActions = new ElementActions(Driver);

            Driver.Url = "http://the-internet.herokuapp.com/";
            Assert.IsTrue(elementActions.IsDisplayed(Driver.FindElement(By.XPath("//a[text()='A/B Testing']"))), "The A/B link wasn't displayed.");
        }