dontcare
dontcare

Reputation: 975

Check if application is suitable for the ms ui automation framework

I want to make basic gui-tests with the ms ui automation framework, therefore i'm starting the program that should be tested over a process object:

Process process = new Process();
process.StartInfo.FileName = path;
process.Start();
AutomationElement mainform = AutomationElement.FromHandle(process.MainWindowHandle);     

Yet my Queskion is how to check if the started program is even suitable to test with the ui automation framework ? If i'm going to start e.g a java programm will the mainform AutomationElement be null ?

Or are all .exe applications ui automation framework compatible ?

Upvotes: 1

Views: 350

Answers (1)

Sam Woods
Sam Woods

Reputation: 1850

Microsoft's "UIAutomation" is a replacement for MSAA "Microsoft Active Accessibility". Both rely on accessibility information to find and interact with controls, so how successful you will be in automating the application directly correlates to how well Accessibility has been implemented in your application. With that said, UIAutomation makes it a bit easier to work with UI's even if they do not have perfect accessibility implementations with just a bit of extra work. UI's created from any programming language generally still implement the UIAutomation interfaces included in Windows, so even a java program should work.

Upvotes: 1

Related Questions