-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add byRole selector #11182
Comments
Just found this, and I want to shamelessly plug my experimental library page.locator('role=button[name="My button"]'); Although the library will technically work in puppeteer or even jsdom, it's designed with playwright in mind, thus intentionally not implementing duplicated features like The selector syntax is similar to the React selectors or the Vue selectors but only supports accessible attributes. It can also use regex for strings to create the selector. The library is still under development, but I plan to experiment with it in gutenberg's e2e test suites when we migrate to playwright (soon). |
Just want to update that we're now using the official built-in role selectors in Playwright and it works perfectly fine migrating from the |
Closing as per above, seems to be working as it is for a large customer. |
Extracted from #11145
https://testing-library.com/docs/queries/byrole/
The text was updated successfully, but these errors were encountered: