Controlling poll frequency of browser.wait() (Fluent Wait)

后端 未结 2 1709
暗喜
暗喜 2020-12-17 16:56

The Story:

In Java selenium language bindings there is a FluentWait class, that allows to tightly control how the expected condition would be checke

2条回答
  •  时光说笑
    2020-12-17 17:28

    With the help of @Kirill S., after the further research and inspecting the WebdriverJS source code, I can conclude that there is no such thing as "poll frequency" in javascript selenium bindings. The interval between subsequent condition check calls cannot be configured - it performs the check as quick as possible.

    This is not the same as in, for instance Python or Java selenium bindings, where there is a configurable timeout between the expected condition state checks. By default, it would wait for 500ms before the next check:

    WebDriverWait by default calls the ExpectedCondition every 500 milliseconds until it returns successfully. A successful return is for ExpectedCondition type is Boolean return true or not null return value for all other ExpectedCondition types.

提交回复
热议问题