Skip to content
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

Make UI automation friendly? #41

Open
fmorency opened this issue Mar 27, 2023 · 2 comments
Open

Make UI automation friendly? #41

fmorency opened this issue Mar 27, 2023 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@fmorency
Copy link
Contributor

fmorency commented Mar 27, 2023

Not sure if this is a real issue as I am a complete web UI newbie, but it seems that some UI ids, e.g., id=tabs-21--tab-1, change from tab to tab.

I am using UI.Vision RPA to generate screenshots for the onboarding documentation, and the tool needs a non-changing name/id otherwise, the macro cannot replay correctly.

Is assigning a non-changing name/id to all UI components possible?

Also affects Alberto.

@fmorency fmorency added the question Further information is requested label Mar 27, 2023
@stanleyjones
Copy link
Contributor

I'll look into UI.Vision RPA but in Alberto we use ARIA roles, as recommended here: https://testing-library.com/docs/queries/about#priority

Based on the Guiding Principles, your test should resemble how users interact with your code (component, page, etc.) as much as possible. With this in mind, we recommend this order of priority:

  1. Queries Accessible to Everyone: Queries that reflect the experience of visual/mouse users as well as those that use assistive technology.
  2. Semantic Queries: HTML5 and ARIA compliant selectors. Note that the user experience of interacting with these attributes varies greatly across browsers and assistive technology.
  3. Test IDs

@fmorency
Copy link
Contributor Author

I used UI.Vision RPA for some documentation because I needed screenshots. However, components were not easily accessible by id/name.

Not sure what the right FE way of doing this but I'm open to discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants