I played a lot with Coded UI Tests API on WPF applications these last weeks.
It turned out that this is a really powerful framework available to use but that we need to write a lot of code ourselves even for simple things.
You may already know the coded ui test utilities of Gautam Goenka available on his blog.
On this blog post, I want to introduce a set of complementary helper methods that you can use in your project. The links to the binaries/sources are at the end of the post.
Here is a list of the available features :
- List, Tree and Menu emptiness tests as User extension methods.
- Helper to get all the AutomationIds of a control collection.
- Helper to get all the children control of a specific type.
- Easier set text syntax with fallback method: youpi !
- Easier set value syntax.
- Easier expand and collapse syntax.
- Easier selection syntax.
- Easier invoke syntax.