Catch browser.html() exceptions in NPM driver

main
Elbert Alias 7 years ago
parent 90566027cb
commit 0c53f79a54

@ -114,8 +114,15 @@ class Driver {
headers[header[0]].push(header[1]); headers[header[0]].push(header[1]);
}); });
try {
const html = browser.html();
} catch ( e ) {
this.wappalyzer.log(error.message, 'browser', 'error');
return resolve();
}
const vars = Object.getOwnPropertyNames(browser.window); const vars = Object.getOwnPropertyNames(browser.window);
const html = browser.html();
const scripts = Array.prototype.slice const scripts = Array.prototype.slice
.apply(browser.document.scripts) .apply(browser.document.scripts)
.filter(s => s.src) .filter(s => s.src)

Loading…
Cancel
Save