About Configuring the GUI Map - WinRunner

Each GUI object in the application being tested is defined by multiple properties, such as class, label, MSW_class, MSW_id, x (coordinate), y (coordinate), width, and height. WinRunner uses these properties to identify GUI objects in your application during Context Sensitive testing.

When WinRunner learns the description of a GUI object, it does not learn all its properties. Instead, it learns the minimum number of properties to provide a unique identification of the object.

For each object class (such as push_button, list, window, or menu), WinRunner learns a default set of properties: its GUI map configuration.

For example, a standard push button is defined by 26 properties, such as MSW_class, label, text, nchildren, x, y, height, class, focused, enabled. In most cases, however, WinRunner needs only the class and label properties to create a unique identification for the push button. Occasionally, the property set defined for an object class may not be sufficient to create a unique description for a particular object. In these cases, WinRunner learns the defined property set plus a selector property, which assigns each objectan ordinal value based on the object’s location compared to other the other objects with identical descriptions.

If the default set of properties learned for an object class are not ideal for your application, you can configure the GUI map to learn a different set of properties for that class. For example, one of the default properties for an edit box is the attached_text property. If your application contains edit boxes without attached text properties, then when recording, WinRunner may capture the attached text property of another object near the edit box and save that value as part of the object description. In this case, you may want to remove the attached_text property from the default set of learned properties and add another property instead.

You can also modify the type of selector used for a class or the recording method used.

Many applications also contain custom GUI objects. A custom object is any object not belonging to one of the standard classes used by WinRunner. These objects are therefore assigned to the generic “object” class. When WinRunner records an operation on a custom object, it generates obj_mouse_ statements in the test script.

If a custom object is similar to a standard object, you can map it to one of the standard classes. You can also configure the properties WinRunner uses to identify a custom object during Context Sensitive testing. The mapping and the configuration you set are valid only for the current WinRunner session. To make the mapping and the configuration permanent, you must add configuration statements to your startup test script. Each time you start WinRunner, the startup test activates this configuration.
Object properties vary in their degree of portability. Some are non-portable (unique to a specific platform), such as MSW_class or MSW_id. Some are semi-portable (supported by multiple platforms, but with a value likely to change), such as handle, or Toolkit_class. Others are fully portable (such as label, attached_text, enabled, focused or parent).

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

WinRunner Topics