Data Scraping not working in for each loop

studio

#1

I have to do web scraping from facebook. When I do it for a single user, it works. But when I do it for multiple users in a for-each loop it does not return any data. Following are the steps:

  1. Log in to Facebook
  2. Read csv containing user names
  3. In For-each loop, search candidate. Collect data of all the users displayed using web scraping method. Write it to another excel sheet.
  4. Log out.
    This is the selector for the attach window of data scraping:
    html omit:htmlwindowname=’_e_0Xkq’ title=’* - Facebook Search’ /

Please help


#2

Did you try to use “Attach to live element” on the selector which is not working ? It seems to me that the selector is not generic enough …


#3

I havent tried this. How do I use it in above case?


#4

Identify the selector which is not working , (works only for the first user and not for the subsequent one’s ) , open its selector , and click on “Attach to live element” , and point to the user 2. This ways UIpath will adjust the selector automatically to work in both the cases , User 1 and User 2 … i.e it will make the selector generic enough so that it works for both the cases …

image


#5

Should I point to the whole window? I an getting error like ‘Could not attach to element’


#6

Not the whole window , the element which you pointed previously … …

have a look at this


#7

htmlwindowname keeps changing. Giving * in it also doesnt work. How do I point to current window?


#8

Check if you are able to use any other selector apart from htmlwindowname , use UIexplorer to identify and test the selectors …