Skip to content

Replay a recording ​

Replay opens a clean browser, restores the recorded conditions and performs each step, checking the page as it goes.

Run a replay ​

bash
node bin/replay.js path/to/bugtrail-recording.json

See Commands for every option. Common ones:

OptionEffect
--headedShow the browser
--continueKeep going after a failed step
--jsonPrint the full result as JSON

What is validated ​

For each step, replay:

  1. Waits until the browser is on the page the step was recorded on, otherwise fails with page mismatch.
  2. Finds the element, trying backup selectors if the first is gone, otherwise fails with element not found.
  3. Performs the action and records its duration.
  4. Takes a screenshot if the step failed.

Replay stops at the first failure unless you pass --continue.

Passwords and uploads ​

Passwords are never recorded, so supply them at replay time. The key is the field's selector as shown in the recording file.

bash
BUGTRAIL_SECRETS='{"#password":"my-password"}' node bin/replay.js recording.json
powershell
$env:BUGTRAIL_SECRETS='{"#password":"my-password"}'; node bin/replay.js recording.json

For uploads, set BUGTRAIL_FILES='{"#cv":["/full/path/to/cv.pdf"]}'. See Settings.

Environment differences ​

If the replay machine has a different screen size or timezone, a warning is printed and the replay still runs.

Next steps ​