Showing posts with label Run Time Errors. Show all posts
Showing posts with label Run Time Errors. Show all posts
Tuesday, 18 December 2012
Run Error: Cannot identify object??
This error indicates that there is no object in the current view of the application that matches the description saved in the object repository for the object.
Run Error: The object is not unique
More than one object within the specified parent object has the same property values as those specified in the test object description for this object.
Run Error: Parent not found
Each object in your component is identified relative to its parent objects.
Re-recording an Object to Identify Parent Object Description Problems
Example:
- 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
- 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):
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:
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.
Run Error: Cannot identify item
QuickTest cannot identify a list or tree item specified in a method argument.
- If the object does not exist, delete the step or modify the item on which you want to perform the step.
- If the item exists, its name may have changed. Modify the name as necessary or specify the item using the item's index (for example, "#4"). Note that different test objects and methods may use a different syntax for specifying an item's index.
Run Error: The object's item is not unique
Q: Why this error occurs??
More than one item in a list or tree item has the name specified in the method argument.
Run Error: Test run failed
Q: Run Error: Test run failed
The run session cannot continue due to an unknown error. Check the step where the failure occurred.
If your component failed while referring to an external file, such as an associated function library, check that the files are accessible from your computer and that the files are saved in the appropriate format.
How to use Watch in QTP?
You can view the current value of any variable or VBScript object in your function library by adding it to the Watch tab. As you continue stepping into the subsequent steps in your function library, QuickTest automatically updates the Watch tab with the current value for any object or variable whose value changes. You can also change the value of the variable manually when the function library pauses at a breakpoint.
- Click the expression and choose Debug > Add to Watch
- Click the expression and press Ctrl+T
- Right-click the expression and choose Add to Watch from the context menu
- In the Watch tab, paste or type the name of the object or variable into the Name column and press Enter to view the current value in the Value column
Handling Run Errors in QTP
The Run Error message box displayed during a run session offers a number of buttons for dealing with errors encountered:
- Stop—Stops the run session.
The run results are displayed if QuickTest is configured to show run results after the run. - Retry—QuickTest attempts to perform the step again.
If the step succeeds, the run continues. - Skip—QuickTest skips the step that caused the error, and continues the run from the next step.
- Debug—QuickTest suspends the run, enabling you to debug the component and any associated function library that contains a function called by the component.
You can perform any of the debugging operations described in this section. After debugging, you can continue the run session from the step where the component or function library stopped, or you can use the step commands to control the remainder of the run session.
- Help—Opens the QuickTest troubleshooting Help for the displayed error message. After you review the Help topic, you can select another button in the error message box.
- Details—Expands the message box to display additional information about the error.
Subscribe to:
Posts (Atom)