Test Runners
Selenium
Because Replay Browser lets you record anything that happens inside it, you can simply just point your test script to the Replay Browser binary and you are all set up.
Install Replay package
To start, you need to install @replayio/replay
package to your project.
Terminal
npm i replayio
Set up the browser binary
In order to use Replay Browser in your Selenium scripts, you need to point your configuration to the Replay Browser binary. The getBrowserPath
function will take care of locating the binary on your machine.
spec.js
1const { Builder, Browser, By, until } = require('selenium-webdriver')2const chrome = require('selenium-webdriver/chrome')3import { getBrowserPath } from 'replayio'45const chromiumPath = getBrowserPath()67;(async function test() {8 let options = new chrome.Options()9 options.setChromeBinaryPath(chromiumPath)1011 let driver = await new Builder()12 .forBrowser(Browser.CHROME)13 .setChromeOptions(options)14 .build()1516 try {17 await driver.get('http://localhost:3000')18 await driver.findElement(By.xpath("//*[text()='Add to Cart']")).click()19 await driver.wait(20 until.elementLocated(By.xpath("//*[text()='Product added to cart!']")),21 5000,22 )23 } finally {24 await driver.quit()25 }26})()
Run your tests
With configration set up, you can run your tests the same way as before. After your run finishes, your recordings will be stored locally.
Upload your replays
Upload your replays with the following command:
Terminal
replayio upload --all
To learn more see the docs on Replay CLI.
After you upload your recordings, you can view them in Test Suite Dashboard.
Learn how to manage your recordings, debug your app using Replay DevTools and more
Manage your recordings
Learn how to upload, remove and view your recordings using CLI
Replay DevTools
Learn how to use Replay DevTools to debug your tests.
Setting up a team
Learn how to create a team in the Replay App
Test Suite Management
Test Suite Dashboard helps you stay on top of your test suite health.