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

ShouldBeAbleToClickInASubFrame() private méthode

private ShouldBeAbleToClickInASubFrame ( ) : void
Résultat void
        public void ShouldBeAbleToClickInASubFrame()
        {
            driver.Url = framesetPage;
            driver.SwitchTo().Frame("sixth").SwitchTo().Frame("iframe1");

            // This should replaxe frame "iframe1" inside frame "sixth" ...
            driver.FindElement(By.Id("submitButton")).Click();

            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMilliseconds(500));
            // driver should still be focused on frame "iframe1" inside frame "sixth" ...
            Assert.AreEqual("Success!", GetTextOfGreetingElement());

            // Make sure it was really frame "iframe1" inside frame "sixth" which was replaced ...
            driver.SwitchTo().DefaultContent().SwitchTo().Frame("sixth").SwitchTo().Frame("iframe1");
            Assert.AreEqual("Success!", driver.FindElement(By.Id("greeting")).Text);
        }
FrameSwitchingTest