wallaby icon indicating copy to clipboard operation
wallaby copied to clipboard

Feature request: Configurable timeout for operations

Open axelson opened this issue 11 months ago • 2 comments

Some of our backend requests for our integration tests take longer to complete than others so we'd like to be able to control the max timeout before a given condition is expected to be true on a per test assertion basis. Without this we sometimes resort to Process.sleep which isn't ideal or create our own system to timeout/wait for a given css to be available on the page.

This applies to many Wallaby functions, but here are a few particular functions where configurable timeouts would be especially helpful:

  • Wallaby.Browser.click/2
  • Wallaby.Browser.assert_has/2

I think that Playwright's rich support for different types of timeouts could be a source of inspiration: https://playwright.dev/docs/test-timeouts

axelson avatar Feb 14 '25 18:02 axelson

Seems reasonable

mhanberg avatar Feb 14 '25 23:02 mhanberg

Instead of a global thing, maybe we can try do something like Explicit Waits in Python Seleniun

https://www.selenium.dev/pt-br/documentation/webdriver/waits/

I think for do this as a option for opeations like find/, fill_in and so on

Also i do not think a way to do this, since itś a trcky using a loop and pooling,

victorfernandesraton avatar Apr 26 '25 07:04 victorfernandesraton