Implicitly wait

Implicitly wait is used to wait upto given specific time and then throws an error as NoSuchElementException if it doesn't identify the WebElement.

This method should be called only once per session and we need to pass integer value in seconds.


	Syntax: driver.implicitly_wait(10)

Example : If you declare ImplicitlyWait with a time 10 seconds , if WebElement is visible less than 10 seconds even then it will click or do the respective operation on that particular WebElement only after 10 seconds.


Example: In the below example we will launch the webpage and enter the text in editbox by implementing implicit wait.

  


ImplicitWait.py

from selenium import webdriver
import time
from selenium.webdriver.common.by import By

driver = webdriver.Chrome("/Users/admin/Documents/Skill2Lead/Others/drivers/chromedriver.exe")

driver.get("http://www.dummypoint.com/seleniumtemplate.html")
time.sleep(2)
driver.implicitly_wait(10)

driver.find_element(By.ID,"user_input").send_keys("Skill2Lead")


time.sleep(5)
driver.quit()