How to iterate loop in anchor tag in web data scraping

activities
studio
datascraping
uipath

#1

hey, I am new in UiPath. can you help me how to iterate loop in anchor tag in web data scraping. given below problem. link- https://ngodarpan.gov.in/index.php/home/statewise_ngo/59/35/1 iterate loop in colunm of Name of VO/NGO achor tag.
screenshot-


#2

Hi @santoshmehta

First think if you don’t have any requirement to read all the data from the grid and you only need to iterate through each link, you don’t need to use data scrapping method.
You can use find children activity to get all the anchor elements. Then iterate through each elements and use Get attribute to get the href of the element.
This will also saves time in not iterating the rows that doesn’t have anchor links.


#3

Hi @Madhavi thanks for replying…

but we can not get data from popups in anchor element. in above question i am attaching link please open this and tell me how can i extract data from there.
thanks


#4

@santoshmehta

Let me first understand your requirement-

  • Open website
  • Loop through the Name of VO/NGO
  • Click each link
  • When pop up open, read data from popup.

Please let me know my understanding is correct. If Yes, Below steps should work.


#5

Thanks lot @Madhavi

your understanding is correct. Please can you share me workflow. In this image i can not see workflow properly.
mail id- santoshmehta1996@gmail.com

Thanks :pray::slightly_smiling_face:


#6

hii @Madhavi thanks for replying…

only anchor data write in csv of this workflow. we can not write popups data.

Thanks


#7

Then you can just use data scrapping and write the result in csv.


#8

Hii, @Madhavi

But we can not write popups data in csv from data scraping.


#9

Build a data table by retrieving the data from the popup screen and write that into csv file


#10

hii @Madhavi

i am trying that but loop is not terminating in all Name of VO/NGO…


#11

Can you send your workflow?


#12

Hii @Madhavi,

given below, we attached workflow in zip.

BlankProcess.zip (44.2 KB)

Thanks


#13

I checked your workflow. your workflow has code to open the link. but no code to close the popup. hence not moving to next record.


#14

Hii @Madhavi,

i did try that but cursor is not moving next step. Same issue again and again…
again i am attaching close the popup code workflow given below.
BlankProcess.zip (45.3 KB)

Thanks


#15

hii @Madhavi,
can you help me how to iterate this.