Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can i identify objects "By Name" in QTP 9.2?
#1
Solved: 10 Years, 9 Months ago
Hey All,

Actually this is my first time to deal with this forum so excuse me if i'm asking some old or preliminary questions, and i'm new to using QTP 9.2 with .NET extensibility trying to automate the testing of an application that's basicly developed using .NET 2003.

I have played around with QTP's recorder and it's seems pretty strong, but unfortunately i ran into some problems trying to identify objects in the application.

Basicly the recorder captures many of the windows within the application but the children objects within those windows are only identified "By Location" (i.e. by the x,y coordinates of the objects with respect to the window)...

So my question is how can i identify those children object within the windows of the application "by name" not by "Location" ????

As i don't want to base my automation on the x,y loactions of objects. I need to capture those objects by name to be able to manipulate them with more flexibility later on.

Here is an example of the script generated by QTP recorder upon running on the AUT

Code:
Window("Application").Activate
Window("Application").WinObject("treeListViewControl").Click 106,57
Window("Application").WinObject("treeListViewControl").Click 126,102
Window("Application").WinObject("treeListViewControl").Click 142,116
Window("Application").WinObject("treeListViewControl").Click 142,135
What i need to achieve..something like

Code:
Window("Application").Activate
Window("Application").WinObject("treeListViewControl").TreeItem("Item 1").click
Window("Application").WinObject("treeListViewControl").TreeItem("Item 2").click
Window("Application").WinObject("treeListViewControl").TreeItem("Item 3").click
Window("Application").WinObject("treeListViewControl").TreeItem("Item 4").click

Reagrds,
Karim.
Reply
#2
Solved: 10 Years, 9 Months ago
Hi,

From your recorded script, we can know that, QTP is unable to identify the objects in your application(because of WinObject statements).

Install proper add-ins and try to record your operations in the application.

Regards,
Uday.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT CAN'T IDENTIFY OBJECTS ORGIO 3 2,099 07-28-2018, 01:25 AM
Last Post: marcelodruida
  UFT unable to identify Java app objects consistently lester 1 1,784 07-12-2018, 08:28 PM
Last Post: Ankur
  How to identify hidden objects shinoj123@gmail.com 1 4,053 09-13-2015, 01:21 AM
Last Post: ADITI1992
  Qtp 10.0 Not able to identify objects on Win 8.1 64 bit OS hpuser 1 2,155 06-11-2015, 06:43 PM
Last Post: venkatesh9032
  QTP 11 Flex 4.5 Unable to Identify Objects krishiyers 1 3,590 12-24-2014, 12:39 PM
Last Post: vds.vipul

Forum Jump:


Users browsing this thread: 1 Guest(s)