Your existing test run command (for example,
npx playwright test) must be updated to include the name of a Replay Browser and required environment variables to record.
You should make this update wherever your run command is defined, typically in
package.jsonor directly in the workflow file.
@replayio/cypressand configuring your project gives access to two additional browser names:
- “Replay Firefox” (macOS, Linux)
- “Replay Chromium” (Linux only)
Pass the following with your run command to record with Replay:
RECORD_ALL_CONTENT=1if using “Replay Firefox”
--browser "Browser Name"
For example, to record with “Replay Firefox”, use the following command:
RECORD_ALL_CONTENT=1 RECORD_REPLAY_METADATA_FILE=$(mktemp) npx cypress run --browser "Replay Firefox"
If you don’t specify a browser, the Cypress default Electron will be used.
@replayio/playwrightand configuring your project creates Playwright projects for specifying a browser.
Pass the following flags to your run command:
For example, to use Replay Firefox, the command is:
npx playwright test --project replay-firefox --reporter=@replayio/playwright/reporter,line
If you don’t specify a project, all projects defined in your config will run.