Rayrun
← Back to videos

Playwright Logger | Read console logs | Playwright Tutorial - Part 52

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.

Related Videos

Generating Playwright Tests in VS Code
Generating Playwright Tests in VS Code
Playwright - Set timeout, parallelisation and retries directly in your test files
Playwright - Set timeout, parallelisation and retries directly in your test files
Element Handle VS Locator API | Playwright Tutorial - Part 47
Element Handle VS Locator API | Playwright Tutorial - Part 47
Playwright Version 1.14 | Playwright Tutorial - Part 45
Playwright Version 1.14 | Playwright Tutorial - Part 45
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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].