diff --git a/lib/Navigator.js b/lib/Navigator.js index 2ce869fc..8d2ff4a4 100644 --- a/lib/Navigator.js +++ b/lib/Navigator.js @@ -41,7 +41,7 @@ class Navigator { let certificateError = new Promise(fulfill => this._client.once('Security.certificateError', fulfill)).then(() => false); let networkIdle = new Promise(fulfill => this._networkIdleCallback = fulfill).then(() => true); let loadEventFired = new Promise(fulfill => this._client.once('Page.loadEventFired', fulfill)).then(() => true); - let watchdog = new Promise(fulfill => setTimeout(fulfill, this._maxTime)).then(() => false); + let watchdog = new Promise(fulfill => this._maximumTimer = setTimeout(fulfill, this._maxTime)).then(() => false); // Await for the command to throw exception in case of illegal arguments. try {