Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python selenium assert presence of an element

try:
    WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, "locator")))
    not_found = False
except:
    not_found = True

assert not_found
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #selenium #assert #presence #element
ADD COMMENT
Topic
Name
7+8 =