testRigor Playwright Plugin
|
|
testRigor Playwright Plugin is an open source npm package, it extends the Playwright driver to allow executing native testRigor commands in Playwright tests and utilize testRigor self healing.
Installation
Requires
Node.js >= 18. playwright is a peer dependency, so install it alongside the plugin:npm i @testrigor/playwright-plugin npx playwright install chromium
In order to use the driver, you must generate a PAT token and provide it when initializing testRigor driver. The token can be generated by following these steps.
Quick start
import { TestRigor } from '@testrigor/playwright-plugin';
const driver = await TestRigor.createBrowserPage(process.env.TESTRIGOR_API_TOKEN!);
driver.setTestContext('my_test');
await driver.get('https://example.com');
const button = await driver.findElement(TestRigor.byUserDescription('Sign in'));
await button.click();
await driver.quit();
Attach to an existing Playwright page:
import { TestRigor } from '@testrigor/playwright-plugin';
const driver = TestRigor.extendPage(page, apiToken);
driver.setTestContext('my_test');
Fluent commands
import { TestRigor } from '@testrigor/playwright-plugin';
const { actions, validations, queries } = TestRigor;
await actions(driver).openUrl('https://example.com').click('Empty Page').execute();
await validations(driver).checkPageContains('expected text').execute();
const value = await queries(driver).grabValue('Some field');
You're 15 Minutes Away From Automated Test Maintenance and Fewer Bugs in Production
Simply fill out your information and create your first test suite in seconds, with AI to help you do it easily and quickly.
| Achieve More Than 90% Test Automation | |
| Step by Step Walkthroughs and Help | |
| 14 Day Free Trial, Cancel Anytime |

“We spent so much time on maintenance when using Selenium, and we spend nearly zero time with maintenance using testRigor.”
Keith Powe VP Of Engineering - IDT



