How to stop clicking the next page if it finishes to the last page. I will not use data scrape since I’m getting specific data inside per row.
Till which page you wants to read?
Regards,
NaNi
Hello @THIRU_NANI
That actually depends if what is the last number of the page. I can’t also use the number in clicking the next page since once it will go to page 5, it won’t proceed to page 6.that’s why im using the next page which is the right arrow
@prititit You can explore the last page if there is any arrow button in that page or not. If not then may be finding that specific arrow element before clicking could help.
Hi
- Use a while loop and mention contain like this
Bool_nopage = False
Where Bool_nopage is a Boolean variable defined in variable panel with default value as False
-
Inside the loop use the set of activities you want to do with the data on each page
-
Atlast inside the loop use a TRY CATCH activity where in try block use a Send hot key activity with key as ctrl+end
And
A click activity which clicks in that number for each page
In that click activity you can see a attaribute holding the page number value which could be either aaname or id
Replace the value of that attribute with a variable named counter
Where counter is a variable of type int32 with default value as 1
And in catch block use System.Exception and use a assign activity
Bool_nopage = True
Which means if the click could click on any number then it will fail and go to Catch block and it will assign Boolean variable as True and gets out of loop
- Next to this try catch inside the same loop use a assign activity like this
counter = counter + 1
Cheers @prititit
step 1: Get the entire text from pagination area. ex: PageNos:12345
step 2: Reverse the string. ex: ReversePageNo:54321
step 3: Get SubString (for determine iterations) of reversed string. ex: SubString(0,1) value will be: 5
step 4: Put Do while loop based on substring variable and create dynamic selector to click on page number.
Note: DON’T forget to update the loop counter after each iteration. (ex:loopcounter=loopcounter+1).
Hope this will help.
Thank you.