I want to make sure that an element is present before the webdriver starts doing stuff.
I\'m trying to get something like this to work:
WebDriverWait w
You do not want to wait too long before the element changes. In this code the webdriver waits for up to 2 seconds before it continues.
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromMilliseconds(2000)); wait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.Name("html-name")));