Urgent help needed in scraping data in excel sheet

I am at a page where there are say 50 results I want to go to each results there are name and number I want to scrape both then want to go back to page again.

So the scenario is like say 50 results in one page, so click on 1st result, from there scrape name and number, go back, go to 2nd result again scrape name number go back, and so on for 3rd 4th upto 50.
And at end want to store all scraped name and number in excel sheet.

I tried a lot of activities like ‘for each’ & while loop also but it is either extracting only 1st result or nothing happening. Please help this is really urgent


did you try with the For Each UI Element Activity?, this is perfect for those kind of cases, give a try


Yes I tried with For Each also, but was unable to generate the perfect scenario for multiple times. Like being at one default page, then clicking on result 1, scraping then going back. Till here getting scraped data in excel for 1 iteration. How to proceed next ? Like after going back clicking on result 2 scraping back, again result 3 click scrape back… No idea how to move forward with this.

Please suggest

Please follow these steps.

  1. build one datatable and add columns according your need.
  2. use for each UI
  3. Inside loop, get data and stores in different variables
  4. inside loop use add data row activity and pass that variable to DataTable that you build in first step.
    In the end you will get proper datatable.
1 Like