A few pointers on how to use Delphi applications with Coded UI

To use Delphi-based UIs with Coded UI tests you would need to implement the MSAA interface for each component you would want to use/have it visible with Coded UI.  Example implementations:

-          TEdit:

-          TreeView

The Coded UI extensibility framework works mostly with MSAA compliant applications (http://msdn.microsoft.com/en-us/library/dd380742.aspx). However, if you  can’t get the Delphi source code and enable MSAA, you will have to do with the plain Windows Win32 support (http://msdn.microsoft.com/en-us/library/dd380742.aspx ).

Is it possible to build a plug-in or add-on in .NET using Coded UI extensibility for identifying Delphi (VCL) UI controls native properties (like id, control name)? As mentioned before, it is the UI control itself that has to expose MSAA compliant properties to be visible, that is, the TEdit or TForm needs to implement it. However the documentation on how to used CodedUI with Silverlight states the following:

“To test your Silverlight applications, you must add Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll as a reference to your Silverlight 4 application so that the Silverlight controls can be identified. This helper assembly instruments your Silverlight application to enable the information about a control to be available to the Silverlight plugin API that you use in your coded UI test or is used for an action recording.

If I understand this correctly, it might be possible to do the same for Delphi CLR .NET applications at the assembly level (I have not seen any reference implementation on how to do this though). For applications compiled to native code you would have to go to the source as explained above.

Comments are closed


<<  June 2017  >>

View posts in large calendar

Month List