Hi All,
Please view the attached screen shot
How to identify an object while executing the script?
Thanks,
Venkat.Batchu
Please view the attached screen shot
How to identify an object while executing the script?
Thanks,
Venkat.Batchu
|
Identifying of an object on window among the multiple objects with similar properties
|
|
Hi All,
Please view the attached screen shot How to identify an object while executing the script? Thanks, Venkat.Batchu
Try this,
Code: Browser().page().frame().image("html tag:=IMG","index:=0").ClickThis will click on the first list button. Vary the index numeric to click on the rest.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
How to view the Index of an object in a window (Note: I am familiar that we could see the index from test object details in object repository)
Does we have any option other than this because to view this index from object repository we need to add objects to object repository.. Thanks, Venkat.Batchu
Descriptive programming should help !
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
HI Venkat ,
I would suggest you to try with the below way. Step1: As per your Spy screenshot's heirarchy, ListButton(Image) comes under "WebTable" object. So identify under which WebTable its falling, then add that WebTable. Step2: Retrieve the rowcount of the above WebTable Step3: Use "For" Loop through the above Rowcount & use "ChildItem" Method for returning the Objects "Image"(ListButton) & then click them I am sure that the above approach would work fine. @Basanth : If the Image(ListButtons) are under the WebTable , then no need of your above approach. Isn't it ?
Hi,
Use Descriptive programming and use HWND as the property so that it identifies all the listButtons uniquely. Code: Browser("").Page("").Frame("").Image("Name:=List", "Hwnd:=------")
Srikanth -
Yes, your approach will also be correct. However, you should also note that all the webtables will not be designed with the childitems in them. Either ways, there is never a issue to try and check out. I replied to Venkat in that manner because his question's intrest just was to click on the list button image. Ramesh - Please verify before you write. There is no name property which defines itself to "List" from the screenshot supplied. Morever hwnd is not a image property. Morever, you cannot use hwnd to always identify objects uniquely because they will correspond to the Window they are in rather than the index where they are located. Restrain yourself from posting if you arent sure about. We should never mislead people when they are in dire need of answers.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life. |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| Facing a problem while identifying Angular JS objects in a web page | vangasantosh | 0 | 1,485 |
12-20-2017, 01:26 PM Last Post: vangasantosh |
|
| Unable to identify Child Object for a window application created using C#. | ssanjeev | 3 | 6,848 |
03-27-2017, 05:38 AM Last Post: ankita |
|
| UFT 11.53 not identifying VB objects wrapped in activeX controls | jainrash | 0 | 2,895 |
07-02-2014, 03:07 PM Last Post: jainrash |
|
| Is there anyway that we can automate adding objects to Object Repository | ArunaSiva | 0 | 2,033 |
06-18-2014, 04:16 PM Last Post: ArunaSiva |
|
| QTP 11 - Idenifying Window Object instead of Browser | Kannan R | 1 | 3,333 |
07-25-2013, 04:14 PM Last Post: learnQtptips |
|