In this video, we'll understand how to use hard and soft assert (expect) in Playwright and also how to mask locators.
In this video, Kaushik introduces the new release of Playwright version 1.20. He covers one highlighted feature, which is the ability to highlight elements by creating a mask on them. This feature can be useful for hiding sensitive locators, such as user IDs, in a test report. He demonstrates how to use this feature by taking a screenshot and attaching it to the report.
Kaushik also mentions other features included in the release, such as updates to the Python Docker image, the grip support for tagging test cases, and the projects feature for running the same test script in multiple browsers with multiple configurations. He briefly mentions the update to the Chromium browser and the addition of hard and soft assert options in the expect function for better test case control.
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 firstname.lastname@example.org.