Skip to content

Add a function to query elements by label - #36

Open
hovinen wants to merge 1 commit into
add-by_role-expandedfrom
support-query-by-name-without-role
Open

hovinen wants to merge 1 commit into
add-by_role-expandedfrom
support-query-by-name-without-role

Conversation

@hovinen

@hovinen hovinen commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

This is equivalent to Playwright's getByLabel.

This is implemented by generalizing QueryByRole into QueryByAriaProperties, making the Role optional. Then by_label just constructs an instance of QueryByAriaProperties without a Role.

@hovinen
hovinen requested a review from ealmloff October 3, 2026 13:17
@hovinen hovinen self-assigned this Oct 3, 2026
@hovinen
hovinen added this pull request to stack #28 October 3, 2026 13:17
@hovinen
hovinen force-pushed the support-query-by-name-without-role branch from 647b664 to 84beb06 Compare October 3, 2026 13:21
@hovinen
hovinen force-pushed the support-query-by-name-without-role branch from 84beb06 to 6152453 Compare October 16, 2026 19:03
This is equivalent to Playwright's
[getByLabel](https://playwright.dev/docs/api/class-page#page-get-by-label).

This is implemented by generalizing `QueryByRole` into
`QueryByAriaProperties`, making the `Role` optional. Then `by_label`
just constructs an instance of `QueryByAriaProperties` without a `Role`.
@hovinen
hovinen force-pushed the support-query-by-name-without-role branch from 6152453 to 6fa67d2 Compare October 23, 2026 07:06
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

Successfully merging this pull request may close these issues.

1 participant