Apart from clubbing up 2 expected_conditions
through or
clause, we can easily construct a CSS
to take care of our requirement The following CSS
will look either for the EC either in mobile_txt_holder
class or in notfoundcopy
class:
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CSS_SELECTOR, ".mobile_txt_holder, .notfoundcopy"))
You can find a detailed discussion in selenium two xpath tests in one