|
|
@ -20,7 +20,8 @@ class ZombieBrowser extends Browser {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
visit(url) {
|
|
|
|
visit(url) {
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
|
|
|
try {
|
|
|
|
this.browser.visit(url, () => {
|
|
|
|
this.browser.visit(url, () => {
|
|
|
|
const resource = this.browser.resources.length
|
|
|
|
const resource = this.browser.resources.length
|
|
|
|
? this.browser.resources.filter(_resource => _resource.response).shift() : null;
|
|
|
|
? this.browser.resources.filter(_resource => _resource.response).shift() : null;
|
|
|
@ -38,6 +39,9 @@ class ZombieBrowser extends Browser {
|
|
|
|
|
|
|
|
|
|
|
|
resolve();
|
|
|
|
resolve();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
reject(error.message);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|