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