WinUI 3 UI testing library #7655
Replies: 3 comments 3 replies
-
For the last 20 years as active Desktop developer on all relevant platforms my advise is still: Don't do automatic GUI Testing on your final product. Write special apps for each single widgets and emulate the incoming events with calls and make this apps as convenient for manual testing. When you use MVVM it is all good enough. |
Beta Was this translation helpful? Give feedback.
-
I think the only way so far is to use WinAppDriver which admittedly is not the best to use. I do this in my projects (not so much though given the complexity) however one tool to make this easier is Legerity developed by @jamesmcroft. It provides good abstractions around the controls without you having to manually see how to invoke specific functionality of such controls. |
Beta Was this translation helpful? Give feedback.
-
@LeftTwixWand if you want to know more about Legerity let me know. I built it out of the same thought process as your own. I think we're also desperately needing a pretty decent update to the |
Beta Was this translation helpful? Give feedback.
-
Hi. I really like WinUI 3 idea, but its infrastructure is still poor.
I mean, the UI XAML editor in VS 2022, which doesn't work with WinUI 3 markup.
And the same with UI testing frameworks. It's really problematic to create and set-up some UI tests for the WinUI 3 app.
Now, one of the ways to do it is WinAppDriver, but it's not really the tool, that's comfortable to use.
It's difficult to set up and write some tests. WinAppDriver works only with FrameworkElement abstraction level and doesn't know anything about the elements, we're using, like buttons etc.
So I propose to create a library, based on the WinAppDriver library with abstraction for all WinUI elements end encapsulate some casting inside.
For example:
Beta Was this translation helpful? Give feedback.
All reactions