jsdevel/webdriver-sync — pull request #77 by jugglinmike (2014-08-27 20:37:26+00:00)
Title: Implement `wait` helper method

@jsdevel I've modified the API a bit from what we drafted in gh-76; I think that requiring options be specified via named attributes of an `options` object makes the resulting code more readable (and also avoids problems like the "boolean trap", where users are forced to remember arbitrary argument ordering details).

> Allow users to specify an arbitrary JavaScript function as a waiting
> condition. This function will be called at an (overridable) interval
> until it returns a truthy value. If the function does not return a
> truthy value within an (overridable) timeout, throw an error.