Forum Discussion

DarkShadows's avatar
DarkShadows
Contributor
7 years ago

How to handle the Pagination - by searching correct employees name in each pages .

Hello Team,

 

I'm stuck at one of area of our application where we are searching specific employees name in the table , These table contains huge data of employees and I need to search my employees name in each page first , and if it is not present then I need to click on next page , a kind of pagination testing I'm doing at the moment, 

 so by default application showing first 10 pages and each pages contains 10 records which means 100 records for first 10 pages and until and unless I'm not reach last page I cannot see next slot of records i.e. 11-20 pages

 

let say if my employee records available at 15 pages then I need to go through all 15 pages just to make sure my employees name is not available in any of previous tables

 

 

if any help of this will be really appreciated , please guide me how can I perform these operations , can you please provide me a sample example of this kind of operation.

 

 

Many Thanks

mail4amit 

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    We do something similar.   At the bottom of the panel that opens up is a text that says something like 

     

    "Showing 11 through 20 of 51" or something like that.  What we do is we parse that sentence in JavaScript using split

     

    var textItems = Aliases.myApp.myPanel.myTextLabel.contentText.split(' ')
    

    Then we do a comparison of the 4th word to the 6th word.  If they are not equal, we click "Next" to go to the next page.  If they are equal, we know we are on the last page.  That's done with textItems[3] compared to textItems[5].

     

    This is just one method but it works for our situation.  Other options are to check the status of the "Next" button.  I'm assuming the next button is disabled when you get to the last page so checking for "disabled == true" or "enabled == false" on that Next button would be a good check as well.