Logic Operators in WebDriverWait Expected Conditions

后端 未结 1 1182
囚心锁ツ
囚心锁ツ 2020-11-30 15:43

I\'m using Python / Selenium to submit a form then I have the web driver waiting for the next page to load by using an expected condition using class id.

My problem

相关标签:
1条回答
  • 2020-11-30 16:01

    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

    0 讨论(0)
提交回复
热议问题