Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98939

Wait for multiple readyStates for Chromedriver Selenium in Python

$
0
0

I would like to wait for the driver until it reaches the interactive state or complete state.

I use || as the or operator but it has syntax error.

WebDriverWait(driver, 10).until(lambda driver: driver.execute_script('return document.readyState') == 'interactive' || driver.execute_script('return document.readyState') == 'complete')

May I know how to fix it?


Viewing all articles
Browse latest Browse all 98939

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>