Data scraping for 3 pages

Hello guys, I have a problem with data scraping. I have to take the data for only 1st 3 pages.

Can you guide me ?

Thanks & Regards,
Nirmalya Sarkar


Just write a code using while loop inside the loop use click activity with dynamic selector to click on the page number then use data scraping and merge with datatable variable.

Hi @aanandsanraj , I click on the “Next” button and assign a variable named count. I am also using while loop . But I can’t write the condition in the proper way.

Can You help me ?

Thanks & Regards,

@nirmalya.sarkar Can try the below attached xaml
Pagination.xaml (9.6 KB)

Hi @nirmalya.sarkar ,

To get only first 3 pages you can try with navigating through url.

Try with the below workflow.
AmazonDataScrap.xaml (18.5 KB)

Thank you @manjula_rajendran . It worked !!!

1 Like

Hi @manjula_rajendran , Can you explain me ‘URL+"&page="+Count.ToString’ this code?

Thanks & Regards,

Hi @nirmalya.sarkar ,


URL - i’ve taken the current page url. See the getbtext activity

by adding the page number to the url it goes to the given specific page.

Count is a holding the page number by incrementing the counter.

Please try to run in debug mode and understand the code. If you don’t understand the code try to see the each values in message box. So you will get from which step what value is coming.

And one more thing, whenever you do web automation first understand the web page clearly. How its url navigating and all.


@manjula_rajendran , I understand the above process. Now I have to do the same for other two types of tea - Black tea & herbal tea.

I have tried these methods-

i. I store the data in excel file and read the data and loop it. But in these case it will scrap data only for green tea.

ii. I took a assign activity and store 3 types of tea and set the variable type as string array. But I cannot change the selector into dynamic .

What is the correct method?

Thanks & Regards,

Hi @nirmalya.sarkar ,

In type into activity i’ve hardcoded “green tea for weight loss”+ “[k(enter)]”

Did you change it?

Look the attached workflow for similar kind of multi input keys.

You need to run everything inside loop thats it.

AmazonScrap.xaml (18.6 KB)

Hi @nirmalya.sarkar ,

Did you able to make it work? or need help?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.