Adding A UI Control To A UIMap Without Adding A UI Action

September 30, 2012 — Leave a comment

Whether you are working with one or many UIMaps the best way to add a UI Control to a UI Control Map , without adding a UI Action, is to right click on the UIMap to which you want to add the control and select
Edit With Coded UI Test Builder”.image

This will open the Coded UI Test Builder


Be sure that the application under test is running.

image_thumb596 image_thumb638

Once the application under test is running, click and drag the bull’s-eye to the desired control. The selected control will be identified by a blue border.


image Releasing the left mouse button over the desired control will bring up a new window containing information about the control.

Clicking on the “UI Control Map” tab to the left of this new window will give you more options.

Amongst the options presented to you, is a button that allows you to add the control to your
UI Control Map without adding a new UI Action to the UIMap.

Click on the first icon:
Add control to UI Control Map


Once the control is added the checkmark located next to the control will become black. To save this control to the
UI Control Map click on the 4th icon located in the Coded UI Test Builder “Generate Code”

image  A window will popup with a note mentioning that no Method Name is required because no UI Action will be generated.

imageThe last step, clicking “Generate” will generate the elements required to include the newly mapped control in the UIMap.

The UI Control will available from code once the project gets built.




Get the code @

No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.