I am working on a project where I have to extract data from multiple pages but there is no next button but there is a forward button and backward button and three pages are executed at a time…once I click on forward button three which was displaying goes forward to next 3pages…while extracting,1st page get extarcted and then bot clicks on forward button and it directly shows 4th 5th 6th button and skip 2nd and 3rd pages and extract directly the 4th page.How I can solve this problem can anyone explain.Please find the screenshot for reference.
You can proceed by clicking on the page number - 1, 2, 3, 4…
before clicking on the page number just check whether the element exists or not.
keep the selector of page number dynamic and increment it.
hey,
You can see Last page Number is Given i.e 76
you can Extract through Get Text
then you can use Do while loop
Keep click Activity and put counter and pass the Counter to click Activity
It will work
Thanks
Hello @Meezan_Murshid
You need to apply some logic to automate this as there is no static next button to extract all the data in a single shot.
What you can do is
- Firs get the number of pages. here it is 76. Assign that to int variable pageCounter.
2)Create a int variable i=1
3)Use a while loop and add condition as i<pageCounter
4)inspect on the page number and you will able to find some attribute as aaname=1 which represents the pagenumber. This needs to be replaced with variable i. - use element exists to check whether page available or not. If True, use click activity and click on that page number.
- Extract the page details using Data scrapping or table extraction.
6)increase the counter i=i+1 - in the else part of if false, click on next button.
so the loop will continue and click on each pages and extract the data.
Dear Varun,
Thanks for your suggestion.
is it possible that we can click at the same place ignoring the ‘aaname’.Here what is happening we can click on the last page no. displaying before the forward button which will redirect us to next page all the time we will click on it.It means that it is working as a next button but the element is changing all the time serial wise like 6,7,8,9…nth.So please suggest that how we can click on the same place everytime igonring the aaname or back element.
you can also try the "Go To URL" Activity for navigating the pages.
url is not changing for every page