slint
slint copied to clipboard
Accessibility: expose `author-id`
We should expose our element id that we now have internally for our test API as the author_id property in accesskit
Original Issue text:
[requests] Add automationID
https://learn.microsoft.com/en-us/dotnet/framework/ui-automation/
Can you maybe provide some more information on what this ticket is supposed to be about?
UI Automation - Microsoft UI Automation Just like automationID in UIA.
Using UI Automation for Automated Testing:
https://learn.microsoft.com/en-us/dotnet/framework/ui-automation/using-ui-automation-for-automated-testing
What is your use case? How would you use that with Slint?
(For general UI testing, we already have a tracking issue: https://github.com/slint-ui/slint/issues/464 )
Going by that link: The automation is based on Microsofts accessibility support. Slint does support accessibility on windows, maybe we already assign such an ID when preparing the accessibility tree?
I am not sure how stable that ID is or how stable it needs to be for this test framework.
The automation of GUI aims to achieve faster speed, which is the same as the pursuit of zero loss speed in Rust performance. Both aim to enable users to use faster speed while also reducing the workload of user operations, especially repetitive keyboard and mouse operations. The progress does not need to be very urgent, only the automation ID can be implemented like QT in the end. First of all, I wish slint success and thank you to slint.
This does not make too much sense to have before we have full support for actions (see #2872 and #2895).
We have added a new author_id property in accesskit 0.15 specifically for the purpose of platform-dependant automated testing. It is exposed on Windows, macOS and Linux following best practice on each platform.
Once the AccessKit dependencies are updated, Slint could assign the name of the elements (as defined in .slint
files) to this property.
@tronical The original title of this issue was more descriptive, as UI Automation is the name of the entire accessibility IPC protocol on Windows. You'll get a cross-platform option with the property described above anyway.
Great! Thanks for the update (and implementing that in access kit). My guts feeling is that it would be best to have an explicit accessibility-id
property in Slint. We could consider initialising it from the element name, but I'm hesitant as an explicit choice for automation might be better than a semi-implicit one. The element name is chosen by the developer for their own liking, while the id we're talking about here becomes part of the "contract" between the developer and the engineers running the test automation (they might be different folks).
What do you think?
For context: Chromium (which inspired AccessKit) uses the HTML ID for this purpose.
Fair point :-)
QT, MFC, and WPF all support UIA. Minimalism, the simplest way of calling is the best.