featurist / browser-monkey

Reliable DOM testing
https://browsermonkey.org
53 stars 6 forks source link

Set timeouts in finders? #31

Closed joshski closed 8 years ago

joshski commented 8 years ago

Timeouts are set on operations like click, because this is where the action happens. But it would be nice if components could set the timeouts, to avoid repeating this stuff around component client code.

Perhaps find should be able to set timeout, which is then overridden by another one set on click etc.

And perhaps timeout should be a chained method:

browser.find("foo").timeout(2000)
joshski commented 8 years ago

Fixed here: https://github.com/featurist/browser-monkey/blob/a7bb7cb9bb2d41abb9e48651621827609a7c4405/test/optionsSpec.js

Thanks @dereke 👍