public static IWebElement waitForTitle(String title) { ( new WebDriverWait(driver, TimeSpan.FromSeconds(30))).Until(ExpectedConditions.TitleIs(title)); IWebElement element = driver.FindElement(By.XPath(title)); return(element); }