# Pagination - How to search items in a page with multiple paginations

If you want to search for a specificstring, "Testappvance15860" for example, and if is not found then it should click on the next page.

![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/z3a5h8PDGW6xmHVE-9fcf4cf12d40.png)

The code will search for the string in the page if the string is not found then it will click on the next pagination

![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/TmUwk5zt2lqOfOSx-3e2c213c00fe.png)

The Js Code is given below

```
var Job=isVisible(link(Jobname));var Pagination=2;log(Pagination.toString());while (Job==false){click(link(Pagination.toString()));var Job=isVisible(link(Jobname));var Pagination=Pagination+1;}click(link(Jobname));
```

---

## Pagination assumptions

Set `<span class="editor-theme-code">Jobname</span>` to an accessor that is unique on the target page and initialize `<span class="editor-theme-code">Pagination</span>` to the first page link used by the application. Add a termination condition when the site can exhaust its pages without finding the item; otherwise the loop can continue indefinitely. Validate the script against the application’s actual pagination labels and disabled-state behavior.

Last updated: October 15, 2026

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>