ExecuteAutomation

Explicit and Implicit wait in Selenium

Implicit and Explicit Wait There are two types of waiting mechanism available in Selenium
  1. Explicit Wait
  2. Implicit Wait

Explicit Wait

Code Snippet
public static void ExplicitWait(WebDriver driver, WebElement element) {
   (new WebDriverWait(driver, 10)).until(ExpectedConditions.visibilityOf(element));
}

Implicit Wait

Code Snippet
public static void ImplicitWait(WebDriver driver) {
   driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
}
Thanks for reading the post and watching the video !!! Please share your comments to improve the post. Thanks, Karthik KK