Skip to content

Latest commit

 

History

History

playwright

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Playwright + Maven + JUnit 4

PlaywrightExampleTest.java opens https://the-internet.herokuapp.com headless with Playwright for Java and tracks two screenshots with sdk-java, the second with test run options and an ignore area.

Prerequisites

Setup

Playwright downloads its browsers on the first run.

Run

mvn test

What to expect

enableSoftAssert is on: the SDK logs a failed check through SLF4J instead of throwing, so the test passes. The examples have no SLF4J binding, so the log stays silent; add one, such as slf4j-simple, to see it.

  • First run: the VRT UI shows a build with two new test runs, "Home page" and "Checkboxes page". Approve them to make them the baseline for the branch.
  • Next runs: the test runs are Ok while the pages look the same. When one changes, it is Unresolved, and the build shows the diff to approve or reject.

Set enableSoftAssert to false to make new and changed screenshots fail the test.