ExecuteAutomation

Hand Coding in Coded UI Testing – Part 1

In this post, we will discuss some of the most basic concept before starting the hand coding in Coded UI Testing with Visual Studio. As a pre-requisite, please watch the video from the article Coded UI record and playback . In previous post, we discussed how each and every controls are identified and how visual studio searches for all these controls and the controls base classes.

Controls Hierarchy

All the controls based on their technology lets say Html, MSAA or UIA have base classes for example, But, for all the controls, there is one more base class called UITestControl, which is available in Microsoft.VisualStudio.TestTools.UITesting namespace. As shown above, all the controls of specific technology has base class as UITestControl.

Reengineering UIMap.Designer.cs

In this post, we will just copy paste some of the auto-generated codes from UIMap.Designer.cs into a new class file and then we will try to create one more class called Caller.cs, which will call the execution to happen. Note that, for each and every controls, we will maintain their relationship between parent and child, so that the control can be identified without any problem. Please watch the complete video below Please leave your comments and thanks for watching the video and reading the article !!! Thanks, Karthik KK