无法在Python Selenium中使用显式等待?

时间:2019-11-18 13:55:18

标签: python selenium selenium-webdriver selenium-chromedriver

我尝试在脚本中使用显式等待,但没有成功。我收到以下错误。问题是什么。我引用了此链接。 https://selenium-python.readthedocs.io/waits.html

错误:

"Message: javascript error: Method Promise.prototype.then called on incompatible receiver function O(a){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}   (Session info: chrome=78.0.3904.97)"

代码

from selenium.webdriver.support import expected_conditions as EC
wait = WebDriverWait(driver, 10)
element = wait.until(EC.element_to_be_clickable((By.XPATH, "//div[@cdl='xxxx']//*[text()='xxxx']")))
element.click()

0 个答案:

没有答案