How to recognize the Total number of Pages - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: How to recognize the Total number of Pages (/Thread-How-to-recognize-the-Total-number-of-Pages) |
How to recognize the Total number of Pages - munish - 07-24-2009 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 RE: How to recognize the Total number of Pages - supputuri - 07-24-2009 Hey Munish, is it possible to share the screen shot so that we can understand yor requirement clearly. RE: How to recognize the Total number of Pages - munish - 07-24-2009 Hi King Please see the attachment for more details. Regards Munish RE: How to recognize the Total number of Pages - supputuri - 07-24-2009 HI munish, '-------------------------------------------------------------------------------------------- Code: Browser(X).Page(X).WebList("name:=Page:").Highlight 'To highlight the listbox in App. '-------------------------------------------------------------------------------------------- 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 RE: How to recognize the Total number of Pages - munish - 07-24-2009 Hi King Thanks for quick response. Your mentioned code work for us. Thanks alot Regards Munish RE: How to recognize the Total number of Pages - venkatbatchu - 07-30-2009 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 RE: How to recognize the Total number of Pages - supputuri - 07-30-2009 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. |