1

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?

  • Does this answer your question? [Selenium C# WebDriver: Wait until element is present](https://stackoverflow.com/questions/6992993/selenium-c-sharp-webdriver-wait-until-element-is-present) – Mikael Sep 06 '22 at 02:58

1 Answers1

0

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("")));
Greg Burghardt
  • 17,900
  • 9
  • 49
  • 92
Carapace
  • 377
  • 2
  • 9