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.json
or directly in the workflow file.Cypress
Adding
@replayio/cypress
and 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_REPLAY_METADATA_FILE=$(mktemp)
RECORD_ALL_CONTENT=1
if using “Replay Firefox”
--browser "Browser Name"
For example, to record with “Replay Firefox”, use the following command:
yamlRECORD_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.
Playwright
Adding
@replayio/playwright
and configuring your project creates Playwright projects for specifying a browser.replay-firefox
(macOS, Linux)
replay-chromium
(Linux only)
Pass the following flags to your run command:
--project project-name
--reporter=@replayio/playwright/reporter,line
For example, to use Replay Firefox, the command is:
javascriptnpx 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.