Categories
end-to-end javascript protractor selenium selenium-webdriver

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

The Story:

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

Each FluentWait instance defines the maximum amount of time to wait
for a condition, as well as the frequency with which to check the
condition. Furthermore, the user may configure the wait to ignore
specific types of exceptions whilst waiting, such as
NoSuchElementExceptions when searching for an element on the page.

In other words, it’s possible to change the polling interval in which the expected condition check is applied, which is by default 500ms. Plus, it’s possible to set exceptions to ignore.

It is also possible in Python, there are relevant poll_frequency and ignored_exceptions arguments to WebDriverWait class.

The Question:

Is it possible to control the poll frequency in which the expected condition is verified when using browser.wait() in Protractor/WebDriverJS?


According to the browser.wait() documentation, there are only 3 possible arguments: a function which is an expected condition, a timeout value and an optional timeout error message. I hope there is a different setting or way to change the poll frequency.