OpenQA.Selenium.FrameSwitchingTest.ShouldBeAbleToClickInAFrame C# (CSharp) Méthode

ShouldBeAbleToClickInAFrame() private méthode

private ShouldBeAbleToClickInAFrame ( ) : void
Résultat void
        public void ShouldBeAbleToClickInAFrame()
        {
            driver.Url = framesetPage;
            driver.SwitchTo().Frame("third");

            // This should replace frame "third" ...
            driver.FindElement(By.Id("submitButton")).Click();

            // driver should still be focused on frame "third" ...
            Assert.AreEqual("Success!", GetTextOfGreetingElement());

            // Make sure it was really frame "third" which was replaced ...
            driver.SwitchTo().DefaultContent().SwitchTo().Frame("third");
            Assert.AreEqual("Success!", GetTextOfGreetingElement());
        }
FrameSwitchingTest