Skip to content

Instantly share code, notes, and snippets.

@jme900
Created August 6, 2015 18:30
Show Gist options
  • Save jme900/a0ba7bde504f4ef0b95b to your computer and use it in GitHub Desktop.
Save jme900/a0ba7bde504f4ef0b95b to your computer and use it in GitHub Desktop.
driver.FindElement(By.Id("Button_To_Click")).Click();
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(15)); //just make it longer then you think the Ajax call will take
//if this ajax call is seen before 15 seconds are up, the driver will stop waiting and create the ajaxItem object
var ajaxItem = wait.Until(driver => driver.FindElement(By.Id("Data_Holder_Name")));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment