Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identifying of an object on window among the multiple objects with similar properties
#1
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi All,
Please view the attached screen shot
How to identify an object while executing the script?

Thanks,
Venkat.Batchu


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 4 Months, 2 Weeks ago
Try this,

Code:
Browser().page().frame().image("html tag:=IMG","index:=0").Click

This 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.
Reply
#3
Solved: 11 Years, 4 Months, 2 Weeks ago
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
Reply
#4
Solved: 11 Years, 4 Months, 2 Weeks ago
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.
Reply
#5
Solved: 11 Years, 4 Months, 2 Weeks ago
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 ?
Reply
#6
Solved: 11 Years, 4 Months, 2 Weeks ago
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:=------")
Reply
#7
Solved: 11 Years, 4 Months, 2 Weeks ago
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Facing a problem while identifying Angular JS objects in a web page vangasantosh 0 1,239 12-20-2017, 01:26 PM
Last Post: vangasantosh
  Unable to identify Child Object for a window application created using C#. ssanjeev 3 6,301 03-27-2017, 05:38 AM
Last Post: ankita
  UFT 11.53 not identifying VB objects wrapped in activeX controls jainrash 0 2,624 07-02-2014, 03:07 PM
Last Post: jainrash
  Is there anyway that we can automate adding objects to Object Repository ArunaSiva 0 1,810 06-18-2014, 04:16 PM
Last Post: ArunaSiva
  QTP 11 - Idenifying Window Object instead of Browser Kannan R 1 3,056 07-25-2013, 04:14 PM
Last Post: learnQtptips

Forum Jump:


Users browsing this thread: 1 Guest(s)