Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to recognize the Total number of Pages
#1
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi

Please help me:
Thru QTP Descriptive Programming how can we recognize the total number of pages in a drop down from list page which are increasing as per number of records on the List page.

Eg. On one page we can be able top see 50 records and the number of records increased as per the new addition of records. So how can I recognize the total number of page in the drop down.

Also how can I count the number of records in the Last page.

Regtards
Munish
Reply
#2
Solved: 11 Years, 4 Months, 2 Weeks ago
Hey Munish,

is it possible to share the screen shot so that we can understand yor requirement clearly.
Thanks,
SUpputuri
Reply
#3
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi King

Please see the attachment for more details.

Regards
Munish


Attached Files Image(s)
   
Reply
#4
Solved: 11 Years, 4 Months, 2 Weeks ago
HI munish,
'--------------------------------------------------------------------------------------------
Code:
Browser(X).Page(X).WebList("name:=Page:").Highlight 'To highlight the listbox in App.
ItemNum = Browser(X).Page(X).WebList("name:=Page:").GetRoProperty("items count")
msgbox = Browser(X).Page(X).WebList("name:=Page:").GetItem (ItemNum)
'This will give the total number of pages.
'--------------------------------------------------------------------------------------------
To check the number of records on the last page either you can use the childobjects of checkboxes or simply by checking the text "300 to 352 of 352".

Let me know if you need more info.
Hi Munish,

but the bette way of writting script should use the number of records shows (352) "1 to 100 of 352" and "Showing:" (100 per Page). Based on these two you should validate the number of pages displayed in the "Pages" list box and then proseed with the above post.

let me know if you need any thing else
Thanks,
SUpputuri
Reply
#5
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi King

Thanks for quick response. Your mentioned code work for us.

Thanks alot

Regards
Munish
Reply
#6
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi King,
How to fetch the data "1-100 of 352 records" in to a variable
can u please explain with the help of script to fetch the value if this value is dynamically varies (Now it is 1-100 of 352) and in the second page 101-200 of 352).
How to fetch these dynamic value in to variable
Could you please refresh me about this?
Thanks,
Venkat.Batchu
Reply
#7
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi venkatbatchu,

Code:
MyDynamicValue = Browser(X).Page(X).WebTable("index:=Here enter UR TableIndex").GetCellData(RowNumber,ColumnNumber)

I think you got the solution. Let me know if you need any clear info.
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Blank pages occurring when running Google Chrome test in ALM 11 DDODGE 0 2,970 05-12-2014, 07:39 PM
Last Post: DDODGE
  Recognize which plugin use opcode 0 1,571 03-03-2010, 03:34 AM
Last Post: opcode
  How to see the data of a third page if it has multiple pages venkatbatchu 5 3,457 07-30-2009, 04:44 PM
Last Post: Saket
  How to retreive the values from a table in different pages sowmyak 1 2,211 07-31-2008, 12:48 PM
Last Post: surya_7mar
  How to check Titles in web Pages manju 2 3,462 01-17-2008, 12:43 AM
Last Post: manju

Forum Jump:


Users browsing this thread: 1 Guest(s)