Error at navigating to next page without having next button

Hi there! I’m trying to extract data from webpages without having next button. if there are more than 3 pages then the website looks like this Capture7 So I’ve used trycatch. Inside try catch if I got an exception like page 4 not found then catch exception and click on element consisting ’…'

When i’m applying the same code on pages less than 4 likeCapture6 Then it is reading a non existing element and the data extracted in the 3rd page is also extracting in 4th page.
Same like when i’m applying the workflow on 2 pages it is reading upto 3 pages which not existed.
Please help with your solutions, if you get what i’m trying to ask. Any help would be appreciated.

Thank you!

Check the selector of the button, you have to find the unique element from that

Thanks

1 Like

Could you check if the webpage url changes depending the page you’re on? If it contains the current page number, you could go to last page, get it’s number, and the loop from 1st to last, scraping each one at a time.

1 Like

selector is static!
Thanks

Can you paste the selector or image of the selector

Thanks

Yeah It does change. But can I get the last page number

I can modify the slector to find the last page button and click on that, but can I know the last number of the pages

Below are the 3 screenshots of that sequence


Thank you!

Click on last button, get the page url, and do some sting manipulation (splits, replaces) to find the number of pages.

Sorry about this.

The url doesn’t change. How can i use string manipulation after clicking on last button

Can you click on last and capture that selector

@Chaitanya_podilapu Use image exists activity for last page if it exists click last button if does not it moves to else part.

image