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

Add ids to ui elements #220

Closed
claytonneal opened this issue Mar 25, 2024 · 4 comments · Fixed by #238
Closed

Add ids to ui elements #220

claytonneal opened this issue Mar 25, 2024 · 4 comments · Fixed by #238
Labels
enhancement 🦾 A small feature (around a day of work)

Comments

@claytonneal
Copy link
Member

for tools like cypress/playwright could be good to add some id's to the modal wallet options
for example to click on VeWorld is currently like:

await page.locator('div.modal-body button.card.LIGHT').first().click();

i.e. relying on it being "first"

@claytonneal claytonneal added the enhancement 🦾 A small feature (around a day of work) label Mar 25, 2024
@darrenvechain
Copy link
Member

darrenvechain commented Mar 25, 2024

This won't work since we're using lit elements. It creates nested shadow roots that are not directly queryable (see screenshot)

image

@claytonneal
Copy link
Member Author

claytonneal commented Mar 25, 2024

Playwright can query such elements
im currently using playwright to click on that element, works fine - just the css selector could be nicer
see: https://playwright.dev/docs/locators#locate-in-shadow-dom

@davidecarpini
Copy link
Member

@claytonneal this playwright feature is amazing, it's such a pita to work with selenium and nested shadow dom.
I'll add them for you in the next days

@claytonneal
Copy link
Member Author

see PR : #238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🦾 A small feature (around a day of work)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants