How to: Edit UI Action Properties Using the Coded UI Test Editor

By using the Coded UI Test Editor, you can open a coded UI test for editing and modify the properties for specific UI actions.

Opening a Coded UI Test in the Coded UI Test Editor

Follow these steps to open an existing coded UI test for editing in the Coded UI Test Editor.

To open a coded UI test in the Coded UI Test Editor

  1. In Solution Explorer, locate UIMap.uitest in your test project.

  2. Right-click UIMap.uitest and select Open.

    -or-

    Double-click UIMap.uitest.

    The coded UI test is displayed in the Coded UI Test Editor. You can now view and edit the coded UI test. For more information, see Editing Coded UI Tests Using the Coded UI Test Editor and How to: Edit a Coded UI Test Using the Coded UI Test Editor.

Editing the UI Action Properties

Follow these steps to edit the properties for specific UI actions in the test methods of your coded UI tests.

UI action properties

To edit UI action properties

  1. In the UI Action pane, expand the test method that contains the UI action for which you want to edit the properties. Select the UI action.

  2. If the Properties window is not displayed, press F4. In the Properties window, locate the action you want to change and edit the properties. For example, if a server is unavailable, and you have a UI action associated with your Web browser that states Go to Web page ‘http://Contoso1/default.aspx’, you could change the URL to ‘http://Contoso2/default.aspx’.

    Tip

    You can use the Find button in the Coded UI Test editor toolbar to open the Find and Replace tool in Visual Studio. You can then use the Find control to help locate a UI action in the Coded UI Test editor. For example, you can try to find “Click ‘Login’ button.” This can be useful in large tests. Note that you cannot use the replace functionality in the Find and Replace tool in the Coded UI Test Editor. For more information, see Find control in Finding and Replacing.

    Tip

    To undo the property changes you made, choose Undo from the Edit menu, or press Ctrl+Z.

  3. On the Visual Studio toolbar, click Save.

    The updates to the test method are saved in the UIMap.Designer file.

See Also

Tasks

How to: Edit Control Properties Using the Coded UI Test Editor

Other Resources

Editing Coded UI Tests Using the Coded UI Test Editor