Package Exports
- role-selector
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (role-selector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
role-selector
Accessible role selector for Playwright, Puppeteer, Cypress, jsdom, and browsers.
Quick Start
Only Playwright and Puppeteer are supported at the time.
import { setupPlaywright } from 'role-selector';
setupPlaywright();
// Given DOM of:
// <label for="username">User Name</label>
// <input id="username" />
// <input type="submit" value="Submit" />
const userNameInput = await page.$('role=textbox[name="User Name"]');
await userNameInput.type('My name');
await page.click('role=button[name="Submit"]');