If you received a Parent not found message, try one of the following solutions:
- Fix the object description of the problematic parent object using the suggestions below
- If you find that an object in your component has one or more property values in its description that differs from the corresponding object property in your application, determine whether the problem is with an individual object in your application, or whether the same problems apply to all or many of the objects in your application with the same object class.
- Find all instances of the old hierarchy in the Expert View and replace it with the correct object hierarchy as described below
Re-recording an Object to Identify Parent Object Description Problems
Follow the instructions below to identify a problem with a parent object.
To identify a problem with a parent object by re-recording the child object:
- Open your browser or application to the page containing the object that caused the error.
- Select the last step in the component in the Keyword View or place the cursor below the last statement in the Expert View.
- Click the Record button or choose Automation > Record.
- Click or perform another operation on the object.
- Click the Stop button or choose Automation > Stop.
- Right-click the new step and select Object Properties.
- In the Object Properties dialog box, click Repository. The Object Repository opens with the new object selected. Note the parent hierarchy of the new object.
- Find the old (problematic) object in the Object Repository and compare the parent hierarchy of the old object with that of the new object.
Check to see whether the differences are due to one or more parent objects with different descriptions, or whether the actual objects in the parent hierarchy are different.
- If you find a problem with a parent description, try to fix it using the suggestions for Solving Object Description Problems.
- If the problem stems from a different set of parent objects in the hierarchy, find all instances of the old hierarchy and replace it with the new object hierarchy as described in the example below.
Example:
Suppose that on a Web site with frames, you recorded a step on an Image object named Poster. In the Object Repository window, you can see that Image object's hierarchy is similar to the following (the object class is listed in parentheses for this example):
MyCompany (Browser)
MyCompany (Page)
Poster (Image)
When you later run the component, the Web page looks the same, but you receive a Cannot Identify Object error for the Poster image. When you re-record the step and view the Image object in the Object Repository window, the hierarchy might look like this:
MyCompany (Browser)
MyCompany (Page)
Poster (Image)
Now you can see that the frames have been removed from the Web page, so even though the Poster image still has the same object description, its parent hierarchy is different.
In the object repository, you can see that there are actually two different poster objects: the old one under the obsolete Frame object, and the new one directly under the MyCompany page.
To fix the problem, you can replace the object in the step by clicking Select another object and choosing the required object from the correct location in the hierarchy (tree).
To keep your Object Repository well-organized, you should also delete the obsolete objects from the Object Repository by right-clicking the obsolete object and selecting Delete.
No comments:
Post a Comment