JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22
  • Score
    100M100P100Q81611F
  • License MIT

Accessible role selector for Playwright, Puppeteer, jsdom, Cypress, and browsers

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"]');