How to wait until element is shown? selenium webdriver C#

Viewed 39

I need to do some actions when an element is shown but I don't know how to wait for it, on selenium document they use Until(ExpectedConditions.ElementIsVisible(By.xPath("")));, but when I try to do it ExpectedConditions doesn't exists so, how can I wait for an element?

1 Answers

ExpectedConditions is under SeleniumExtras.WaitHelpers

using SeleniumExtras.WaitHelpers;

var wait = new WebDriverWait(driver, new TimeSpan(0, 0, 30));
var element = wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("")));
Related