Aracılığıyla paylaş


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’.

    İpucu

    You can use the Find button in the Coded UI Test editor toolbar to help locate a UI action. For example, you can try to find “Click ‘Login’ button.” This can be useful in large tests.

    İpucu

    To undo the property changes you made, selectg 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