gpt4 book ai didi

java - "Implicit wait"等待元素可点击、显示或可见

转载 作者:太空宇宙 更新时间:2023-11-04 13:26:09 25 4
gpt4 key购买 nike

有人对 Selenium WebDriver 中的隐式显式wait之间的区别存在疑问。

What is difference between Implicit wait Vs. Explicit wait in selenium webdriver?

When to use explicit wait vs implicit wait in Selenium Webdriver?

在 SeleniumHq 上还有:

Implicit Waits

An implicit wait is to tell WebDriver to poll the DOM for a certain amount of time when trying to find an element or elements if they are not immediately available. The default setting is 0. Once set, the implicit wait is set for the life of the WebDriver object instance.

但不清楚这是什么样的等待,我的意思是它会等到 isDispalyedisVisibleisClickable

最佳答案

我相信隐式等待并不关心任何这些属性(isDisplayed、isVisible 或 isClickable)。它只是等待您设置的时间,并定期检查您尝试选择的元素在 DOM 中是否可用。如果没有找到,它将引发超时错误。

关于java - "Implicit wait"等待元素可点击、显示或可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32631388/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com