kobenguyent ยท GitHub

Motivation/Description of the PR

ARIA locators ({ role: 'button', text: 'Submit' } / { role: 'button', name: 'Login' }) work at runtime since #5260 and are documented in docs/locators.md, but CodeceptJS.ILocator never included them - TypeScript reports TS2353: 'role' does not exist in type 'ILocator'.

Adds:

| { role: string; name?: string; text?: string; exact?: boolean }

Optional text / exact match the acceptance tests and WebDriver; name matches the docs and Playwright/Puppeteer.

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium

Applicable plugins:

  • aiTrace
  • autoDelay
  • autoLogin
  • customLocator
  • pause
  • coverage
  • heal
  • retryFailedStep
  • screenshot
  • selenoid
  • stepTimeout
  • subtitles

Type of change

  • ๐Ÿ”ฅ Breaking changes
  • ๐Ÿš€ New functionality
  • ๐Ÿ› Bug fix
  • ๐Ÿงน Chore
  • ๐Ÿ“‹ Documentation changes/updates
  • โ™จ๏ธ Hot fix
  • ๐Ÿ”จ Markdown files fix - not related to source code
  • ๐Ÿ’… Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

Read the original on github.com โ†—