2. UIMap files
The UIMap file is acctually 3 files:
UIMap.uitest – is an xml file.
UIMap.cs
UIMap.Designer.cs
The file is an automatic generated file that is re-
written each time the Coded UI Test Builder is used,
thus it cannot be manually changed.
3. UIMap.Designer.cs Anatomy
This file is empty until you record something with the
Coded UI Test Builder.
We will now analyze the UIMap.Designer.cs
generated in Lesson 3 – Calculator example.
7. Params Class Anatomy
The Params Classes contain only Fields.
They group all the data that is changeable.
Examples:
Expected values
Paths
Etc..
9. Control Mapping Class Anatomy
Lets analyze the Control Mapping Class structure.
Here we have two controls mapping the Calculator
main window and the number 2 mapping
10. Control Mapping Class Anatomy
We see that there is a small difference is their
Constractor. This is because the calculator main
window is the first mapped object. Whereas the
number 2 is searched under it, so it gets its “father”
UITestControl to search under it.
11. Control Mapping Class Anatomy
The class name should be a name that will help us
identify it easily.
The class inherits the base class of the control it is
mapping. Examples:
abcButton : WinButton
abcWPFButton : WpfButton
abcWPFList : WpfList
12. Control Mapping Class Anatomy
Search Criteria region is where we add all the
properties we have of the control until we can uniquely
map it.
Examples:
WinButton.PropertyNames.ControlId
WpfButton.PropertyNames.AutomationId
13. Control Mapping Class Anatomy
The Properties and Fields regions contains all the child Controls
Mapping Classes.
In our case we have here a property for the number 2 mapping class.
14. Control Mapping Class Anatomy
This way we do not search for the control each time we
want to us it.
15. Control Mapping Class Anatomy
Another type of Property is a lowest “son” Control. In
those cases we add the Search Criteria to Property.
In this case we search for a WinButton.