Record Tests (experimental)
Last updated
Last updated
This is an experimental feature and may change or be removed in the future
Tests can be generated by recording your own interactions with the device through the browser.
Simply add await session.record()
anywhere in your test and then run your test in headed mode (npx playwright test --headed
)
Playwright will pause at session.record()
and any interactions you make on the device will be put here.
Once you are finished, click the Resume button on the Playwright Inspector:
You will see that session.record()
has been replaced with your interactions:
Run the test again and it will replay the recording.