I have an excel file that contains several variables that I want to use to perform a web search. I use “read range” to read the data from the Excel table and “for each row”. In total I would like to do three searches. For each search i want to apply Data Scraping and save the results in a separate Excel file.
However, the data scraping does not work properly. When I use the Data Scraping Wizard, everything works perfectly. But the transfer to the Excel spreadsheet does not work properly. On the first pass data is mostly transferred, after that the selector becomes invalid. It looks like the data scraping always works only for the first search, but is not taken over for the other search attributes. I compared selectors for different searches but could not find any differences between them. The page URL is not changing for the different searches. What could be the problem? I have attached a picture of the selector.
No when i rearrange the values it’s not working anymore… It seems like the Data Scraping is only limited to the attributes of the first search and is not working in the loop with the other search attributes…
I tried it now without a loop, so a seperate Excel Sheet for each Search and two times Data Scraping. The strange thing is that this time the data scraping results of the second search were entered into both Excel sheets, although the data scraping was performed twice.
Yes. I tried it now again with a loop but only with one search attribute. Everything worked fine. Then i changed the values and tried again. The new parameters are filled in in the web search, but the Data Scraping results remain the same from the search with the first parameters… i really dont understand it. It seems like the Data Scraping is always fixed to the values when i used the Extracting Wizard but do not adapt to new search results.
Just to check, since I had not the same, but a similar issue:
Extracting a DataTable into a loop, seems to work a in a bit “not natural way”, since we would expect every extraction to be done from 0.
My issue was that within a retry scope, if an extraction was done into the variable “A” and during the retry, a new extraction was done into the same variable “A”, on the 1st execution, the variable was empty, so everything was scraped as expected. But on the 2nd loop, the variable already had some value, and instead of scraping new data, and “overwriting” the old data, UiPath did some kind of “Merge” instead.
My solution (not sure if it will help, but it did on my end) was to add a “var_datatable = Nothing” activity (assign), to make sure that inside each loop, the dataTable is clean and does not carry over any information from previous loops.
When i close the page from which the Data Scraping was done (after the extraction for sure and when the robot is not running) the selectors is becoming invalid… i want to scrape prices from different insurances from a comparison portal. Could it be that they use something to protect against Data Scraping and thats why it’s not working? Thank you all for your help