--- src/drivers/npm/node_modules/zombie/lib/document.js +++ src/drivers/npm/node_modules/zombie/lib/document.js @@ -247,7 +247,7 @@ function setupWindow(window, args) { browser._windowInScope = window; let result; if (typeof code == 'buffer' || code instanceof Buffer) code = code.toString(); - if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, context, { filename });else if (code) result = code.call(window); + if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, context, { filename, timeout: 1000 });else if (code) result = code.call(window); browser.emit('evaluated', code, result, filename); return result; } catch (error) {