background image
<< Move Up or Move Down objects | Modifying or Deleting a Custom Class Name >>
<< Move Up or Move Down objects | Modifying or Deleting a Custom Class Name >>
Mapping Object Types
Using Advanced Features Before Recording
Creating a New Object Order Preference
Robot has two predefined object order preferences: <Default> and C++
Recognition Order. You can create additional preferences to handle special
To create a new object order preference:
1. In an ASCII editor, create an empty text file with the extension .ord.
2. Save the file in the Dat folder of the project.
3. Click Tools > GUI Record Options.
4. Click the Object Recognition Order tab.
5. From the Object order preferences list, select the name of the file you created.
6. Change the method order to customize your preferences.
Mapping Object Types and Classes Before Recording
As explained in Controlling How Robot Responds to Unknown Objects on page 2-7, Robot
recognizes all standard Windows GUI objects and many custom objects. You can
also set a recording option so that Robot either automatically maps unrecognized
objects to the Generic object type, or stops during recording so that you can map the
object to a standard object type.
If you know in advance that the application-under-test contains a custom object or
any object that Robot does not recognize, you can create a custom object mapping
before you start recording. You do this by adding the object's class to the list of classes
that Robot recognizes, and then associating the class to a standard object type. Robot
saves this custom class/object-type mapping in the project and uses it to identify the
custom object during playback.
Defining an Object Class Mapping
To define an object class and map an object type to it:
1. Identify the class name of the window that corresponds to the object.
You can use the Spy++ utility in Visual C++ to identify the class name. You can
also use the Robot Inspector tool by clicking Tools > Inspector.
NOTE: The custom mapping from class name to object type is stored in the
project and is shared among all users of the project. Be careful about changing
existing mappings because this may cause already-recorded scripts to play back