FRAMEWORK » SELENIUM » ELEMENT
Wait
Explicit wait
Usage
python
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
WebDriverWait(browser, 10).until(
EC.presence_of_element_located((By.ID, 'foo'))
)Expected conditions list
EC.title_isEC.title_containsEC.presence_of_element_locatedEC.visibility_of_element_locatedEC.visibility_ofEC.presence_of_all_elements_locatedEC.text_to_be_present_in_elementEC.text_to_be_present_in_element_valueEC.frame_to_be_available_and_switch_to_itEC.invisibility_of_element_locatedEC.element_to_be_clickableEC.staleness_ofEC.element_to_be_selectedEC.element_located_to_be_selectedEC.element_selection_state_to_beEC.element_located_selection_state_to_beEC.alert_is_present
Implicit wait
Selenium will wait this value for every element that is not found immediately.
python
browser.implicitly_wait(10) # seconds