Navigate Pagination Command

<< <%SKIN-STRTRANS-SYNTOC%> >>

Navigation:  Agent Commands > Action Commands >

Navigate Pagination Command

Typically, pagination is the feature that gives the user the ability to navigate among multiple pages. The most common example of pagination is a website that displays a search results listing that spans multiple pages. This command follows all pagination links on a web page, and will process a specific container command after opening each pagination link.

 

The figure below shows the Configure Agent Command panel after choosing Navigate Pagination from the New Command drop-down:

Action Command - Navigate Pagination

 

Pagination takes several different forms, but in nearly all cases it will fall under one of the following categories:

Next Page link/button

List/sequence of numeric links

List/sequence of text links.

We cover each of these in the sections below.

 

Single Next Page Link

We recommend that you use the Single Next Link pagination type on a website that uses a single link to move to the next page. In addition to a single Next Page link, a website may provide a sequence of pagination links. In such cases, you should still choose this pagination type, which will ignore any of the other pagination links. It's only necessary that Content Grabber can move to the next page in the sequence. So, it's more efficient to identify the Next Page link.

 

Content Grabber will continue to follow the Next Page link until it no longer appears on the next results page - or it becomes inactive. In very rare cases, a website may continue to display an active Next Page link even when there are no more pages available, and may link back to the first page in the sequence or continue to load the last page.

 

You can check the box for Use Page Count and then configure the agent to stop the pagination command when it reaches the maximum number of pages. The Page Count property requires you to specify the Capture Commands that delivers the maximum page number. Most websites that display a search result will also display the total number of available pages in the search result, so you can choose the Web Element Content command to capture the total number of pages. Then, use this command to place a limit on the number of pages that the pagination command will process.

 

If you want to stop pagination on a fixed page, you can add a Calculated Value command that contains the fixed page number, and then use that command as the command that delivers the maximum page number.

 

List of Numeric Links

This pagination type is the best choice for a website that only displays a sequence of pagination links but lacks a Next Page link. Page set navigation links are often found together with the numeric links. For example, if a you find 10 numeric links, the page set navigator links allows a user to navigate to the next 10 numeric links or the previous 10 numeric links. This pagination type requires one web selection for the numeric links and, if applicable, another selection for the page set navigator link that moves to the next set of numeric links.

 

When Content Grabber processes a list of numeric links, it will extract a specific attribute of the chosen web elements and then convert the content into numeric values. If the agent cannot convert the content into a numeric value, it ignores the corresponding link. Content Grabber expects a sequence of links, so it will continue to the next page number in the sequence after it processes the current page number. You can use a content transformation script to convert the content into a number. For example, if the agent cannot convert the text attribute of a pagination link directly into a number, it may look for the page number in the URL attribute. In this case, a transformation script would be necessary to transform the URL into a number.

 

List of Text Links

Use this pagination type on a website that features a list of pagination links but none of the attributes of the link elements will convert into sequential numbers. A common application of this pagination type is on a website that displays items according to the first letter of the item name. In cases like this, the pagination would consist of all the letters in the alphabet (A-Z), and when a user clicks on a letter, all items starting with that letter will appear in the listing.