This is the third post in this series on the extensibility of Coded UI Test. Before reading this, you should read the previous posts of this series to better understand this post.
In this and next few posts, I will explain a sample extension that we have for Microsoft Excel. The worksheet (Grid like) control of Excel is a custom control and the cells in this control are not visible to Coded UI Test by default. The sample extension attached to this post uses the extensibility that I have mentioned in this series to make the cells inside the Excel Worksheet region visible to Coded UI Test as control with customized properties. Before continuing further, see the demo video of this extension in action –
To play with the sample, copy it locally and do a clean build. Use the CopyDrop.bat or refer step 5 in the blog 2 of this series to deploy the sample.
Now, let me explain the high level architecture and components of this extension. The architecture looks like –
The sample has 3 modules –
The below table dives into Excel Extension at class\file level –
Description and use
Detail in blog
ExcelTechnologyManager, ExcelElement, ExcelWorksheetElement and ExcelCellElement
The main classes in this extension related to implementing the technology adapter for Excel. The ExcelTechnologyManager implements UITechnologyManager and other classes implement UITechnologyElement.
Blog 4 of this series
An action filter (aggregation rule) specific to Excel. This class implements UITestActionFilter.
Blog 6 of this series
The property provider for Excel. This class implements UITestPropertyProvider.
Blog 5 of this series
The package entry point. This is similar to HelloWorldPackage class covered in Blog 2 of this series.
Blog 2 of this series
Singleton instance to manage the .NET Remoting interface that is used to communicate with Excel Add-in.
Various simple utilities and PInvoke definitions.
The sample is a basic sample for Excel support and is in no way near complete. The sample should be used for understanding the extensibility concepts and not as the real support for Excel.
The complete source code for this sample is here.
Proceed to blog 4 of the series to understand the code for this sample.