Because Replay’s recorder is a standalone browser, all you need to do to start recording your puppeteer tests is pass in the path to Replay’s fork of chromium.
const puppeteer = require("puppeteer");
const { getExecutablePath } = require("@replayio/puppeteer");
(async () => {
const browser = await puppeteer.launch({
headless: false,
/* Set the path to replay-chromium */
executablePath: getExecutablePath("chromium"),
});
const page = await browser.newPage();
await page.goto("<https://replay.io>");
await page.screenshot({ path: "replay.png" });
await page.close();
await browser.close();
})();
Setting up Replay is as simple as downloading the browser, using it in your tests, and uploading the recordings.
[@replayio/puppeteer](<https://github.com/Replayio/replay-cli/tree/main/packages/puppeteer>)
with npm i @replayio/puppeteer
in your project.replay-chromium
in the puppeteer.launch()
call. See example above.npx @replayio/reply upload-all
command. See more here.<aside> 📌 Replay is up-to-date as of Puppeteer version 13.3.1. If you are using a newer version and run into a problem, please open a GitHub issue here to let us know!
</aside>