background image
<< Test C++ applications | Changing the Order of Object Recognition Methods >>
<< Test C++ applications | Changing the Order of Object Recognition Methods >>

Using Advanced Features Before Recording

Using Advanced Features Before Recording
2-11
Using Advanced Features Before Recording
In addition to setting the standard GUI recording options, you can take some
additional steps to refine your testing. You can:
Customize the order of the object recognition methods to make the script more
readable and stable.
Map object types and classes to identify custom objects during record and
playback.
Customizing the Object Recognition Method Order
As explained in the previous section, Robot has two predefined preferences for the
recognition method order for each standard object type: <Default> and C++
Recognition Order. When you record an action on an object, Robot tries each
method within the selected preference in sequence until it finds one that uniquely
identifies the object.
You can redefine the order in which Robot tries recognition methods for each object
type. This order has an effect on both the readability and stability of script
commands. For example, when you read script files, it is easier to locate a command
on a specific object if that command uses the object name or label for identification.
However, if the object name or label is likely to change between builds, another
recognition method may provide more stability.
You should evaluate your own development and testing environment before you
change the default order of object recognition methods.
Important Notes
Changes to the recognition method order affect scripts that are recorded after
the change. They do not affect the playback of scripts that have already been
recorded.
Changes to the recognition method order are stored in the project. For example,
if you change the order for the CheckBox object, the new order is stored in the
project and affects all users of that project.
Changes to the order for an object affect only the currently selected preference.
For example, if you change the order for the CheckBox object in the <Default>
preference, the order is not changed in the C++ preference.