Wednesday, July 25, 2007

Selecting an Object Order Preference

Robot uses a variety of object recognition methods in order to uniquely identify objects in the application-under-test that are acted on during recording sessions. For example, Robot can identify a check box in the application-under-test by its object name, associated label or text string, index value, or ID value.

These recognition methods are saved as arguments in script commands so that Robot can correctly identify the same objects during playback.

Robot has two predefined preferences for the recognition method order for each standard object type. While recording an action on an object, Robot tries each method within the selected preference in sequence until it finds a method that uniquely identifies the object.
The following table describes the two predefined preferences.
Object Order PreferenceRecognition Method OrderComments
<Default>Object Name Label and/or Text Index IDIndex comes before ID. In some environments, such as PowerBuilder and Visual Basic, the ID changes each time the developer creates an executable file and is therefore not a good recognition method.
C++ Recognition OrderObject Name Label and/or Text IDIndex ID comes before index. In some environments, suchas C++, the ID does not usually change and is therefore a good recognition method.

The object order preference is the initial setting. If you plan to test C++ applications, change the preference to C++ Recognition Order.

Note

Settings in the Object Recognition Order tab of the GUI Record Options dialog box do not affect HTML recording. When recording against HTML, Robot always uses HTMLID, if available, and then name, text, and index recognition and ignores any settings in the Object Recognition Order tab.

To change the object order preference:

  1. Open the GUI Record Options dialog box.
  2. Click the Object Recognition Order tab.
  3. Select a preference in the Object order preference list.
  4. Click OK or change other options.

Note

The object order preference is specific to each user. For example, you can record with C++ preferences while another user is recording with preferences at the same time.