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

[Feature] Add 'attribute' selector to the list of id, data-testid, ... #1983

Closed
thernstig opened this issue Apr 25, 2020 · 2 comments
Closed

Comments

@thernstig
Copy link
Contributor

Currently the attribute selector https://github.com/microsoft/playwright/blob/master/docs/selectors.md#id-data-testid-data-test-id-data-test-and-their-light-counterparts searches for id, data-testid, data-test-id, data-test and their :light counterparts.

Would it not make more sense to rename all these to just attribute, or at least add attribute to the list? API's that are almost self-explanatory by naming conventions are great APIs.

@pavelfeldman
Copy link
Member

Could you elaborate on how this attribute selector would work and disambiguate with the css=hello constructs?

@thernstig
Copy link
Contributor Author

thernstig commented Apr 26, 2020

I must have read the docs too quickly. I misunderstood thinking that id=foo would translate to css=[foo]. Basically my request would be a new feature which makes no sense then.

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

No branches or pull requests

2 participants