Playwright Logger - Playwright generates a lot of logs and they are accessible via the pluggable logger sink.
In this video, Kaushik introduces the Playwright logger and explains its use case. He demonstrates how to use the Playwright logger in code and also shows how to use it with a fixture. However, he mentions that using the logger with a fixture is currently not working due to a bug in Playwright.
Kaushik then explains how to get error messages from the console during automation using the page.on
method. He shows how to handle different types of console messages and how to filter for error messages specifically. He also suggests combining the logger with a tool like Winston to store the logs in a file.
Overall, the video provides a detailed explanation of the Playwright logger and how to use it effectively for logging and error handling during automation.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].