Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fetching total number of records inside a webtable
#1
Not Solved
I am trying to find the total count of records which are displayed inside a webtable. the webtable has page number links(1,2,3,....) and i want to know the total from all the pages. please help me with the QTP code. Note: I tried with rowcount() but it retrieves only one page record not all pages. please help
Reply
#2
Not Solved
Please clarify me howz ur pagination looks like is it a drop down or
123456789...
after clicking ...11 12 13 14 15 16

Because it is bit hard way to count records using pagination for the above html view.
Reply
#3
Not Solved
Hi,

By default the pagination is in 1 you will get the record count for that page u need the increment the link by 1 and should start the loop again and store the first page and second page link count in a dynamic array...

You will get total count of the webtable in all pages.


The pagination link will be spyed as webtable try to spy correctly(This is main part of the program)

snippet.
Code:
//For pagination it will act as link

Set objLinkColl = Browser(".*").page(".*").webtable("Page link").count
//Msgbox objLinkColl
//Msgbox Browser(".*").page(".*").webtable("Page link").childobjects(objlink)
//Take unique property of pagination links in objlink.


Counter = 1
For i = 0  to webtablecount

//if i = webtablecount then

// Increment pagination by 1 using counter variable

objlinkcoll(i) = Counter + 1

i = 1

exit for

else

Msgbox "End of rows"

Endif

Next


//Try use the above snippet and modify hope it works..

Happy scripting
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best method to use for automating 1000 records shuhale 0 1,093 07-21-2021, 11:42 PM
Last Post: shuhale
  Read Content inside PDF kotaramamohana 0 1,197 09-02-2020, 05:49 PM
Last Post: kotaramamohana
  does WebTable Object provides a method to get column number umer830 4 12,909 07-06-2018, 09:32 AM
Last Post: vijaychourasiya0109@gmail.com
Question Find specific records in a SwfTreeView on different node levels lotos 0 2,411 10-06-2017, 05:14 AM
Last Post: lotos
  Link in a webtable in a webtable Soulwalker 1 2,833 07-19-2017, 01:44 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)