跳过等待网站计时器Selenium Python

跳过等待网站计时器Selenium Python,第1张

跳过等待网站计时器Selenium Python

根据您的代码试用,您可以删除

time.sleep(30)
诱使 WebDriverWait 使其可点击,如下所示:

from selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support import expected_conditions as EC# lines of preWebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.ID, "proceed"))).click()

注意* :根据用例,以最大时间限制配置 WebDriverWait 实例。该元素 可见启用后
,该

expected_conditions
方法
element_to_be_clickable()
将返回 WebElement
,以便您可以单击它。

***



欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/zaji/5655684.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-16
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存