Skip to content

Commit 6b56c2a

Browse files
reubenmillerDavertMik
authored andcommitted
[Nightmare] Load blank page when starting nightmare so that the .evaluate function will work if _failed/saveScreenshot is triggered before a page is loaded by the user (codeceptjs#938)
1 parent 2c6dd24 commit 6b56c2a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/helper/Nightmare.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ class Nightmare extends Helper {
231231
this.browser = this.Nightmare(this.options);
232232
await this.browser;
233233
}
234+
await this.browser.goto('about:blank'); // Load a blank page so .saveScreenshot (/evaluate) will work
234235
this.isRunning = true;
235236
this.browser.on('dom-ready', () => this._injectClientScripts());
236237
this.browser.on('did-start-loading', () => this._injectClientScripts());

0 commit comments

Comments
 (0)