Configuring how to handle unexpected windows during playback

Problems can occur during script playback if unexpected windows are displayed. Unexpected windows such as security and warning message dialogs or custom dialogs can cause playback failure with exceptions such as object not found or window not activated. You can configure how unexpected windows can be handled so that scripts can be played back smoothly without interruption.

About this task

You can identify unexpected windows in each test domain and specify how such windows must be handled during script playback.

Procedure

  1. Click Configure > Configure Unexpected Windows to open the Configure Handling of Unexpected Windows dialog.
  2. From the Test Domain list, select the domain for which you are configuring unexpected windows.

    If you do not know the domain of the unexpected window, select All Windows to see a master list of unexpected windows with window titles for all domains. The Unexpected Window Title field lists all unexpected windows in the selected domain.

    If the required window title is not listed in the Unexpected Window Title list, you can add the missing window to the list by clicking the Add Window option. An empty row is added in the Unexpected Window Title list. Double-click the cell in the empty row and type the window title. To remove a window from the list, select the corresponding window row and click Remove Window.

  3. Select the window for which you want to configure the action to be taken. You can configure an unexpected window either to be closed automatically, or have a specific action performed on it, determined by additional recognition properties that you can define. Do one of these procedures:
    1. To indicate that the window must be closed automatically, select Close from the Select Action list.
    2. To indicate that a specific action must be performed on the window, select Click Action from the Select Action list to indicate that a specific action be performed on a specific control on the window.

      The Configure action objects properties field displays the object recognition properties of the control on the selected window such as Property Name and Property Value. To modify the recognition properties, double-click the Property Name cell in the required row and type the required property name.

      If a required property name or value is not displayed, you can add the property by clicking Add Property. An empty row is added in the Configure action objects properties field. Double-click the Property Name cell in the empty row, and type the required property name. You can also use the Test Object Inspector to get properties for the control on unexpected window. Open the unexpected window and the Test Object Inspector. Move the cursor over the window to get the title. Move the cursor over the specific control, to get its property name and value. See Displaying test object information for instructions to use the Test Object Inspector.

      To remove recognition properties for the control on the selected window, select the required property row and click Remove Properties.

      To apply modified recognition properties to the control on the selected window, click Apply.

  4. Select the Perform close action for 'non-configured' windows check box to set the Close action for all windows that have not been configured. You can use this setting to close any unexpected windows that were not captured during recording of the script.
  5. After completing your configuration, click Finish to save your changes.

What to do next

Enable the unexpected window handling feature by selecting the Enable handling of unexpected windows check box on the Unexpected Windows page in the Preferences dialog. When you play back a script, displayed unexpected windows are handled according to the configuration on the Configure Handling of Unexpected Windows dialog.