What is the correct syntax checking the .readyState of a website in Selenium Python?
问题 I'm trying to check the .readyState of a website using .execute_script but I keep getting an error. I'm using a pageLoadStrategy of "none" in chromedriver so I'm trying to test that the websites readystate is no longer "loading". Note: this question is Python-specific. WebDriverWait(driver, timeout=20).until( driver.execute_script('return document.readyState') == 'interactive' ) value = method(self._driver) TypeError: 'str' object is not callable I've also tried using lambda which doesn't