Partager via


Coded UI Test – Tip of the Day #1 - Win+I to locate controls

In the Coded UI Test Builder, you can drag the cross-hair and drop it on a control to see its properties. While you are dragging the cross-hair, a blue highlight rectangle will be drawn around the control which has focus.

In some cases, e.g:- context menus, this model will not work. When you start a drag operation of the cross-hair, the context menu will get dismissed. To address such scenarios, we have provided the feature to use Win+I to locate controls. You just have to move your mouse cursor over the desired control (e.g:- a context menu) and press Win+I. [Windows key and I together]. This will highlight the selected control and show its properties in the Coded UI Test Builder properties window. You can now add this control to the UI Control Map or add an assertion on its properties.

 

Of course, once you become familiar with this feature, you will use this for all cases where you want to locate a control. [I do.]