10-22-2008, 07:48 PM
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
What i need to achieve..something like
Reagrds,
Karim.
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
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.