Configuring a Standard or Custom Class - WinRunner

For any of the standard or custom classes, you can modify the following:

  • the properties learned
  • the selector
  • the recording method

To configure a standard or custom class:

  1. Choose Tools GUI Map Configuration to open the GUI Map Configuration dialog box.
  2. To configure a standard or custom class

    The Class List contains all standard classes, as well as any custom classes you add.

  3. Click the class you want to configure and click Configure. The Configure Class dialog box opens.To configure a standard or custom class
  4. The Class Name field at the top of the dialog box displays the name of the class to configure.

  5. Modify the learned properties, the selector, or the recording method as desired. See “Configuring Learned Properties”, “Configuring the Selector”, and “Configuring the Recording Method” for details.
  6. Click OK.
  7. Note that the configuration is valid only for the current testing session. To make the configuration permanent, you should paste the TSL statements into a startup test script. See “Creating a Permanent GUI Map Configuration” for more information.

  8. Click OK in the GUI Map Configuration dialog box.

Configuring Learned Properties

The Learned Properties area of the Configure Class dialog box allows you to configure which properties are recorded and learned for a class. You do this by moving properties from one list to another within the dialog box in order to specify whether they are obligatory, optional, or available. Each property can appear in only one of the lists.

  • The Obligatory list contains properties always learned (provided that they are valid for the specific object).
  • The Optional list contains properties used only if the obligatory properties do not provide a unique identification for an object. WinRunner selects the minimum number of properties needed to identify the object, beginning with the first property in the list.
  • The Available Properties list contains all remaining properties not in either of the other two lists.

When the dialog box is displayed, the Obligatory and Optional lists display the properties learned for the class appearing in the Class Name field.

To modify the property configuration:

  1. Click a property to move from any of the lists. Then click Insert under the target list. For example:
    • To move the MSW_class property from the Obligatory list to the Optional list, click it in the Obligatory list, then click Insert under the Optional list.
    • To remove a property so that it is not learned, click it in the Obligatory or Optional list, then click Insert under the Available Properties list.
    • To modify the order of properties within a list (particularly important in the Optional list), click one or more properties and click Insert under the same list. The properties are moved to the bottom of the list.
    • Click OK to save the changes.

Note that not all properties apply to all classes. The following table lists each property and the classes to which it can be applied.

To modify the property configuration

Configuring the Selector

In cases where both obligatory and optional properties cannot uniquely identify an object, WinRunner applies one of two selectors: location or index.

A location selector performs the selection process based on the position of objects within the window: from top to bottom and from left to right. An index selector performs a selection according to a unique number assigned to an object by the application developer. For an example of how selectors are used, see “Understanding the Default GUI Map Configuration”.

By default, WinRunner uses a location selector for all classes. To change the selector, click the appropriate radio button.

Configuring the Recording Method

By setting the recording method you can determine how WinRunner records operations on objects belonging to the same class. Three recording methods are available:

  • Record instructs WinRunner to record all operations performed on a GUI object. This is the default record method for all classes. (The only exception is the static class (static text), for which the default is Pass Up.)
  • Pass Up instructs WinRunner to record an operation performed on this class as an operation performed on the element containing the object. Usually this element is a window, and the operation is recorded as win_mouse_click.
  • As Object instructs WinRunner to record all operations performed on a GUI object as though its class were “object” class.
  • Ignore instructs WinRunner to disregard all operations performed on the class.

To modify the recording method, click the appropriate radio button.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics