-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Ability to locate elements using accessibility values #9918
Comments
I agree that this is a great feature to have unfortunately it requires the 2 features below to be implemented by browser vendors as they would turn on the accessibility tree in the browser. Another way that we could do it when implemented is when the W3C WICG AOM spec has been shipped a bit more. https://wpt.fyi/results/webdriver/tests/get_computed_label |
Window.getComputedAccessibleNode(element) is now experimental in chrome, requires passing CLI flags. ChromeDevTools protocol also has direct support in format aria\role[name]. I'd be interested in getting some Hacks/POC's running though, it's obviously going to take a long time to get browser support standardised so it would be able to experiment with proposed syntax and APIs. |
I'm going to close this in Selenium tracker. Essentially once it gets added to the spec, we'll implement it in Selenium, and the spec is tracking it here: w3c/webdriver#1441 Like David mentioned, it's all held up by the browser vendors not yet having provided access to the tree in the first place. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🚀 Feature Proposal
With selenium 4, we should be able to locate elements using their accessibiliy attributes(ARIA) https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA mainly accessibility NAME
Motivation
I was trying to find the search box with the keyword search in google. After trying it in multiple ways, with relative locators etc I was not able to figure out a way to locate it using the keyword search eventhough it is available (refer to the below screenshot)
Example
Something like this
The text was updated successfully, but these errors were encountered: