I'm having trouble trying to make a script with 2 conditions and choosing the first condition that appears something like:
try:
element = WebDriverWait(driver, 800).until(
EC.presence_of_element_located((By.CLASS_NAME, value="class show"))
).click()
print ("1st element clicked")
time.sleep (10)
element = WebDriverWait(driver, 10).until_not(EC.title_contains(("how to get"))),
or
element = WebDriverWait(driver, 800).until_not(
EC.title_contains((word))
)
print ("2st element clicked")
except:
pass
print("skip to next step")
print ("finish")
the script wait until 1st or 2nd condition appears first, if nothing appear until timeout, skip to next step.