Hello Team,
I’m trying to scrape the data from HP Warranty Site for each Serial Number but I’m unable to save the result in next row and values are being overwritten via UiPath.
Here is what I’m trying to do and suggest if I’m doing something wrong
Visit HP Site
Created Read CSV (containing Serial Numbers)
add each row activity (variable) created
Data Scrapping for 3 fields
Start Date
End Date
Serial Number
I tried both Activity Write Range & Write CSV but ivain
for every iteration the data is written from A1, B1 and C1.
That’s why you are getting one row.
Every time the row number must be increased i.e for 2nd time it shold be A2, B2, C2. Or simply use append range, it will take care of it.
Also have to look at the data being extracted i.e What kind of data you are extracting. Whether it is a string or data table. Because if it is a DataTable then the column index must be set accordingly.
Just try to save the output extracted from the three Extract Structured Data Activity in three different sheets of same excel using the append range activity.
I was searching for another solution and found the data can be copy pasted from web to excel using get text activity. Would you have some recommendations around it?
That’s why I was asking about the data to be extracted. If it is a String then Get Text should be used.
Follow these steps:-
Instead of Get Structured Data use Get Text.
Save the value in variables (serialNo, startDate, endDate).
After extraction, before clicking the ‘Check another product’ button use activity Add Data Row with array value being {serialNo, startDate, endDate} and output DataTable variable be outDT.
Outside the For Each Data Row scope write the Data Table outDT to an excel file using the Write Range activity.
Caution: You have to be careful while using the Get Text activity as it’s efficiency depends upon the selector you set and it may be so that you have to use Anchor Base activity to locate the values to be extracted from the web page.
Hello Varun,
Thank you for sharing the sample file. I tried the sample and it worked for 1st warranty check however when the second serial number is being processed I’m getting the selector error.
I’m attaching here the selector snapshot’s as well. I unchecked aaname & title just to double check if the flow works. The format I’m trying to capture is Date should it be a String or another data type?
Hi Varun,
I tried both ways using UiExplorer and repairing. I’m suspecting this is failing due to the Title which has a specific model and I’m searching the dates for multiple model’s.