Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Count number of specific elements on a web page
#7
Solved: 10 Years, 9 Months, 2 Weeks ago
HI,
I would suggest to try in the below approach.

Code:
Set Brw=Description.Create
Brw("micclass").Value="Browser"

Set Pg=Description.Create
Pg("micclass").Value="Page"

Set Wrg=Description.Create
Wrg("micclass").Value="WebRadioGroup"

Set Brw_Collection=Desktop.ChildObjects(Brw)
msgbox "No. of Browsers: "& Brw_Collection.count

     Set Br1_Pgcollection=Brw_Collection(0).childObjects(Pg)
     Set Br1_Pg1_WrgCollection=Br1_Pgcollection(0).ChildObjects(Wrg)
     msgbox "No. of WebRadioGroups in Browser1,Page1 : "&Br1_Pg1_WrgCollection.count

     Set Br2_Pgcollection=Brw_Collection(1).childObjects(Pg)
     Set Br2_Pg2_WrgCollection=Br2_Pgcollection(0).ChildObjects(Wrg)
     msgbox "No. of WebRadioGroups in Browser2,Page2 : "&Br2_Pg2_WrgCollection.count
Reply


Messages In This Thread
RE: Count number of specific elements on a web page - by sreekanth chilam - 09-28-2010, 12:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can QTP handle slick grid table in a web page qtplearner88 2 4,303 10-01-2019, 10:44 AM
Last Post: shilpi952
Question Find specific records in a SwfTreeView on different node levels lotos 0 2,218 10-06-2017, 05:14 AM
Last Post: lotos
  Click on calender on specific date. venkatesh9032 1 3,751 12-02-2015, 07:30 PM
Last Post: nistalaramesh
  DP Web Browser/Page issues rstimers 1 2,315 08-14-2015, 12:37 PM
Last Post: venkatesh9032
  How to get center data value in a odd number of rows and columns web table ... sai rajesh 0 2,618 11-13-2013, 10:24 PM
Last Post: sai rajesh

Forum Jump:


Users browsing this thread: 1 Guest(s)