You can also insert dynamic test objects by using Insert
Dynamic Test Object. The hierarchy of a test object in
the object map represents the order of search of the particular control
during playback. Over a series of application changes, the hierarchy
of the objects may change if new objects are introduced in the test
application. This results in a playback failure. Using dynamic test
objects you can anchor a test object as a descendant to its parent.
- From the test object map menu, click to open the Select an Application dialog.
- In the Application Name field,
select the application that contains the controls you want to test
and click OK.
- In the Test Object Map toolbar, click .
Test UI opens the Object Map
dialog.
- On the Select an Object page, click
the Object Finder icon and drag it into the application over the object
you want to add to the test object map. For other methods of selecting
objects, see Select an Object.
- Click Next.
- In the Add Dynamic Test Object , select Anchor to Selected Parent.
By selecting Anchor to Selected Parent,
you are making the new object a descendant of its parent. You can
now search for the object dynamically, anchoring to the parent. You
can edit the recognition properties by double clicking on the object
properties.
- Select the object that you want to insert and click Finish.
Note: To convert an existing mapped object to a dynamic object,
right-click in the test object map and click
Convert To
Dynamic Test Object . The Administrative
property displays an additional
descriptionobject
property.
To convert a dynamic test object to a mapped test object, set the
descriptionobject
property
to false. However, you must ensure that the test object is a mappable
child of its parent.
Note: To prevent playback
failure due to object hierarchy changes, you can also enable the dynamic
find feature, which enables
Test UI to
locate test objects in the application-under-test whose hierarchical
position may have been altered from the position in the test object
map. For information about the dynamic find feature, see
Enabling the dynamic find feature.