Created
June 20, 2023 22:36
-
-
Save timcash/4ad84bbb215716c5e226f1597542ea1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mainPage.on("console", (message) => { | |
if (message.type() === "error") { | |
// if message has 404, ignore it | |
if (message.text().includes("404")) { | |
return; | |
} | |
log(ll.alert, "PAGE:", message.text()); | |
} else { | |
log(ll.info, "PAGE:", message.text()); | |
} | |
}); | |
// Use this to see all requests made by the page | |
mainPage.route("**", (route) => { | |
// console.log(route.request().url()); | |
route.continue(); | |
}); | |
// Use this evaluate javascript in the page | |
await mainPage.evaluate(() => { | |
console.info("browser logging attached"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment