Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Last active September 17, 2018 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/481bb0aab92829f6970eae0f27abc155 to your computer and use it in GitHub Desktop.
Save angelovstanton/481bb0aab92829f6970eae0f27abc155 to your computer and use it in GitHub Desktop.
IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl("http://demos.bellatrix.solutions/");
var wait15Seconds = new WebDriverWait(driver, TimeSpan.FromSeconds(15));
var wait30Seconds = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
var wait45Seconds = new WebDriverWait(driver, TimeSpan.FromSeconds(45));
var promotionsLocator = By.Id("Promotions");
wait15Seconds.Until(ExpectedConditions.ElementExists(promotionsLocator)); // same 30 seconds
var promotionsLink = wait30Seconds.Until(ExpectedConditions.ElementToBeClickable(promotionsLocator));
promotionsLink.Click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment