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..
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 ?
08-12-2009, 01:38 PM (This post was last modified: 08-12-2009, 01:47 PM by basanth27.)
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.