I would recommend you to use UiExplorer with data scraping, in the Uiexplorer there are selectors which you can use to distinguish the next button just add a click activity on it and continue scrapping on the next page as well.
Another way to go about it would be by using 'get attributes' activity using this you can check if the next button has a value of true or false to determine if there is a next page or not!
you can refer the tutorial below for more information on these activities