5. Explicit Waits with WebDriverWait & EC

WebDriverWait in Python

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

wait = WebDriverWait(driver, 10)
el = wait.until(EC.visibility_of_element_located((By.ID, "welcome-msg")))

Task

  • Wait for visibility using `EC.visibility_of_element_located`.
💡Common doubts
Did you like the problem?
Lesson 5 of 8
Python
Loading code editor…
Next