Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP "Cannot identify the object"
#1
Solved: 10 Years, 9 Months, 1 Week ago
First off, I have been using QTP for only two months so bear with me.

I have been tasked to learn QTP and support a suite of "record and play" test scripts.

These screen gadgets are static. The 'content' of the screen gadgets is dynamic, but new gadgets do not appear and none disappear.

I have an issue where the test causes a new browser window to pop up. Dozens of other scripts in the suite bring up a new window and QTP and those scripts have no problems. But this script has an issue.

Line (27):
Code:
"Browser("").Page("").WebList("Apply").Select("HHH")".

brings up this error:
"Cannot identify the object "Apply" (of class WebList). Verify that this object's properties match an object currently displayed in your application."

I am new at QTP, but I am an experienced programmer, tho not with VB.

"HHH" is an item in the list.

This is not a Sync issue, neither Browser("").Page("").Sync or Wait( ) helped. The web page has finished rendering.

I rebuilt the offending line and used the hints from the editor. The syntax is correct and the object names agree with the Local Repository.

I wrapped the misbehaving code with:
Code:
IF Browser("").Page("").Exist THEN
        Browser("").Page("").WebList("Apply").Select("HHH")
    END IF
and the same error was thrown. QTP sees the browser and page.

The "Highlight in the application" tool did highlight the web list in the application.

I rebuilt this page in the Local Repository and still got the error.

The "Update from Application" tool did not make the error go away.

But, the "Locate in Repository" tool said: "Cannot locate this object in the object repository."

So what do I not understand? The object is there. The page is visible and stable in the browser. The Repository agrees with the code. The Repository was built from the page, but the Repository does not recognize the gadget on web page.


I am using QTP 9.0. Upgrading to a supported, current, version is not an option.
The box is running windows XP and the browser is IE 7.0.5730.11

Rick
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
I stay as far away from the object repositories as I can so I'm no real authority on them. That said, if I were faced with this problem I would try a different method of identifying the WebList object - Descriptive Programming. Using the Object Spy on it I would grab some properties and values to uniquely identify it such as "name", "html id", and maybe "class". Then you can use:

Code:
Browser("obj").Page("obj").WebList("name:=namevalue", "html id:=htmlidvalue", "class:=classvalue").Select("HHH")

The Browser and Page objects can be the items from your repository, but the WebList descriptive key/value pairs provide you with a measure of control over how to identify the WebList object directly in your code.
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
I'm also facing the similar issue. Even it through's error even in descriptive programming. It says the object is not present.
When i use object Repository. i'm able to "Highlight " the object from the Repository and its getting highlighted in application. But while running it through's error.

How to solve this error.
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
if you are able to highlight in application then it means qtp is capturing the object.
look for the properties that are captured in OR and then use those properties in your descriptive programming for defining the objects
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot identify the object "Webtable" korunu 1 2,394 06-29-2016, 05:28 PM
Last Post: Ankesh
  Cannot identify the object "Webtable" korunu 0 1,641 05-11-2016, 12:02 AM
Last Post: korunu
  What is the criteria of identify the object based on Base & option filter properties Suma Parimal 2 2,900 01-28-2014, 06:35 PM
Last Post: Suma Parimal
  Cannot identify image of win object Salem 0 2,121 06-14-2013, 12:32 PM
Last Post: Salem
  unable to identify Checkbox Property inside the WinList Object tech.savy987@gmail.com 2 4,005 07-20-2012, 10:18 AM
Last Post: Shridevi.Salagare

Forum Jump:


Users browsing this thread: 1 Guest(s)