AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
25.22k stars 2.18k forks source link

Extension of UIA capabilities (support for more controls) #10143

Open pfeigl opened 1 year ago

pfeigl commented 1 year ago

Is your feature request related to a problem? Please describe. With https://github.com/AvaloniaUI/Avalonia/pull/5177 a MVP has been added to support UIA. Are there any plans to drive this any further in the forseeable future? I was playing around with it a little today and realized that even basic controls like Label (which should be very similar to TextBlock) are missing right now.

Another control that would be really intereseting for automated testing is the DataGrid. This is probably our main focus when testing applications and checking whether displayed data is as expected.

Describe the solution you'd like I'd love to see more controls supported.

Describe alternatives you've considered There is obviously completely different approaches to test the UI as described in https://dev.to/ingvarx/how-to-automate-ui-testing-in-avaloniaui-app-4an4 , but we'd really like to stick to our existing toolset (Ranorex in this case) to implement our tests.

maxkatz6 commented 1 year ago

Are there any plans to drive this any further in the forseeable future?

I don't think any work from the core team is planned for the 11.0 release. But since framework support was done already, more controls can be updated to support it and bugs can be fixed. So, any help will be appreciated.

I have created this label for related issues, so it can be tracked easier. https://github.com/AvaloniaUI/Avalonia/labels/area-accessibility

CC @grokys

maxkatz6 commented 1 year ago

There is obviously completely different approaches to test the UI as described in https://dev.to/ingvarx/how-to-automate-ui-testing-in-avaloniaui-app-4an4 , but we'd really like to stick to our existing toolset (Ranorex in this case) to implement our tests.

This topic explains Headless testing approach, which we can recommend for unit and e2e testing. As it's fairly more stable than existing automation-based tooling (at least comparing to our Appium experience) and can run anywhere, but on other hand it doesn't allow to test anything platform specific. Also, you are right, it can't be compared with some more advanced toolsets.

grokys commented 1 year ago

Actually, I do have some work nearly ready to add support for ITextProvider on Windows; just need to complete the implementation for macOS.

We've been getting quite a few requests for a11y/automation support recently so hopefully we'll be filling in the gaps in the coming months. Controls like Label should be trivial to implement (though I'd wait for the ITextProvider API) so we should start with these.

DataGrid is going to take a bit more work...