Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle timeout when waiting for page readiness (#30)
Prior to this commit, if the Promise stored in the binding named `loaded` rejected while the WebDriver "wait" command was being evaluated, that rejection would trigger a Node.js global "unhandled rejection" error and cause the process to crash. Track all Promise values so that a rejection in any of them at any time is handled by the caller. Recognize when the expected "load" event has already occurred and stop waiting immediately.
- Loading branch information