public void ShouldImplicitlyWaitForAnElementToBeVisibleBeforeInteracting()
{
driver.Url = dynamicPage;
IWebElement reveal = driver.FindElement(By.Id("reveal"));
IWebElement revealed = driver.FindElement(By.Id("revealed"));
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMilliseconds(5000));
Assert.IsFalse(revealed.Displayed, "revealed should not be visible");
reveal.Click();
try
{
revealed.SendKeys("hello world");
// This is what we want
}
catch (ElementNotVisibleException)
{
Assert.Fail("Element should have been visible");
}
}