Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[Feature] A special locator to visually locate an element #2877
Comments
|
Have you seen already the selector documentation? Text, css, xpath, shadow dom selectors are available: https://playwright.dev/#version=v1.2.0&path=docs%2Fselectors.md&q= Does this fit for your needs? A feature for highlighting a certain dom node will be tracked here: #2747 |
|
Yes, I have seen it and it still doesn't fit my need. I would love to see this feature. Last but not least, thanks for a great library. I also saw you python version. Hopefully, we can have a production version soon :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let us know what functionality you'd like to see in Playwright and what is your use case.
A special locator to visually locate an element.
In taiko, browser automation library by thoughtwork, you could locate element visually like the following:
click(checkbox(near("Username")))Taiko calls it proximity locator
Refer: https://docs.taiko.dev/#smart-selectors
This locator will reduce the flakiness of the script because the locator doesn't rely on html structure that may be changed from time to time. Even we can assign data-testid attribute but this is very useful in some cases as well.
Do you think others might benefit from this as well?
Yes, it is.