I have trouble understanding how to use an \'expected conditions\' to check for the presence of an element. Given this documentation it is not clear at all how to use this.
First you need to import expected_conditions module from selenium.webdriver.support. With this module you can check several conditions of the element with giving expected time as well
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome()
driver.get("http://domain/element")
try:
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.ID, "idxxx"))
)
finally:
driver.quit()