-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture and log page errors #374
Conversation
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Log outputExpand to view the last 100 lines of log output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, tests can be written in browser-console.test.ts
, where you can throw some promise errors inside the evaluate function.
await page.evaluate(() => Promise.reject(new Error("Boom")));
// make sure to add some stack here and do the needful.
Let me know if you need any help.
@vigneshshanmugam i have added a unit test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, can you add a test for promise rejection as well.
@vigneshshanmugam promoise rejections doesnt let the test run. I think current test cover enough scenerios. |
Probably its a problem then, The intention of the original issue was to capture unhandled exceptions. Will merge once i test it out. |
Fixes #226
Add an event handler in browser console for "pageerror".
Capturing
error.message
anderror.stack.toString()