featurist / browser-monkey

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

timeout option for "click" #27

Closed artemave closed 8 years ago

artemave commented 8 years ago

Otherwise it seems like I need to shouldHave before I can safely click.

adiel commented 8 years ago

Really? I'm sure that's not the intention..

dereke commented 8 years ago

@artemave click will wait for the element to appear before clicking on it. It will never try and do anything until there is an element - same goes for any of the other actions. The docs probably don't make this clear but you can adjust the timeouts and try interval:

does that help?

artemave commented 8 years ago

Ah, I was passing timeout to find, rather than click. That is not supported, which was a bit counterintuitive, but that is ok.

dereke commented 8 years ago

find will never timeout as it doesn't actually do anything. find simple adds selectors to be executed when you call an action such as click/typeIn etc.