.Net GUI testing of third party components
Recently I have started to create a prototype automated test for a .net based desktop application. Our team uses at-least two third party components which I cannot reach with the MS UIAutomation framework. The tree just ends with the pane which implements the third party components and elements within seem to be unreachable for the automation framework.
In the screen-shot you see the VisualUIAVerifyNative.exe tool (which is included in the Windows SDK 8.1) has the Lassale AddFlow component selected in our application. The object tree just ends and the box element named "Initial" is not available to interact with. (Having used Selenium in the past it feels weird you cannot access all the elements)
My current fall-back is image based testing (finding a partial image within the current view), find the elements coordinates and use the mouse to select it and the keyboard to interact with it. This works, but this feels like a hackish workaround and very time consuming if the style of the application changes.
I expect I am not the first who is running into issues with creating automated tests with MS UIAutomation and third party components.
What is the best practice in a situation like this, is it possible to find the elements in another way? (Or are there other better frameworks for this?)
VisualUIAVerify relies on the MSAA interfaces to find the information about all the controls on window UI. If the third party components used in your application doesn't support MSAA, no way that test frameworks that relies on MSAA to work.
There are a few options:
- Check out the testability support with the third party component provider, they may have their own ways to support GUI accessibility or testablity. I've seeing this before.
- Ask your development team to provide additional APIs to let you call and get the controls's information, like control coordination
- Use image recognition based test tool like sikuli