Question

I'm using QTP 11.0 on Win 7 Pro SP1. I'm an absolute beginner on QTP.

I'm trying the Mercury Tours tutorial.

When I try to run the tutorial, I get the following error message:

Cannot identify the object "userName" (of class WebEdit). 
Verify that this object's properties match an object currently displayed in your application.

Line(1): "Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName") .Set"tutorial""

I would be grateful for any advice.

Was it helpful?

Solution

Identification errors in QTP can be caused by several things:

  1. The most straightforward one, as indicated in the error message itself, is that the properties of the runtime object in the application are different from the test object properties stored in the Object Repository, or from the descriptive properties mentioned in the script. Use the Object Spy and see which property is causing the discrepancy.

  2. A modal popup is active and the object being invoked is behind the popup. This prevents QTP from accessing and actioning upon the objects at the rear window.

  3. The add-in was not loaded. For this case, it's the Web add-in. Without this add-in, the browser gets interpreted as a single Windows object.

  4. The browser was already open when you launched QTP. QTP needs to establish certain hooks on Internet Explorer to intercept events as they occur. This phase could fail when the browser is already active to begin with.

There are cases when this error is thrown when the object gets moved to a different frame. QTP still sees the original frame, but the object is no longer there. You may get an entirely different error for this case though, depicting that it's the parent that can't be identified.

If you're just starting out in QTP, do know that you may see this error periodically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top