When we work with UI test controls in coded UI tests they are separated into two parts: actions and properties.
The first part consists of actions that you can perform on UI test controls. For example, coded UI tests can simulate mouse button clicks on a UI test control, or simulate keys typed on the keyboard to affect a UI test control.
The second part consists of enabling you to get and set properties on a UI test control. For example, coded UI tests can get the count of items in a ListBox, or set a CheckBox to the checked state.
Get and Set Properties
To get and set UI property value of any control, we directly set or get the value of property using
The UITestControl.GetProperty will try to get a value out from the property, for example, if we need to get a value of “DisplayText” property or “FriendlyName” property from a checkbox, then we can use the
to get the value from the control.
Similarly we can set the property for a control.
For more information on Get and Set property, please watch the video below
Please leave your comments and thanks for reading the blog and watching the video.