"role" selector
#2818
Replies: 1 comment 2 replies
-
|
Maestro and React Testing Library are miles apart in terms of approach. React Testing Library is far lower level. Maestro is arms-length e2e testing. I think you can do what you're after via a CSS selector though. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
One improvement that could make Maestro even more powerful would be supporting selectors by semantic role (e.g., role=button).
In modern testing libraries (like React Testing Library), querying by role is the preferred way to find elements because it aligns with how users (and assistive tools) actually interact with the UI. Roles are part of the accessibility tree, meaning a “role”-based selector targets elements that are visible, actionable, and meaningful to all users.
Why this matters for Maestro:
In short, a role selector would make tests more semantic, more resilient, and more inclusive, helping Maestro’s philosophy of writing tests that behave like real users.
Beta Was this translation helpful? Give feedback.
All reactions