Hi
Currently I use an excel sheet with login credentials to sign in to a site and download two PDFs, move the downloaded PDFs to a client specific folder and send them to clients’ email , but I am stuck with
Updating the progress as success or failure in a separate column in the same excel sheet.
Some clients’ password may have expired and in that case robot stops there and does not proceed with the next client. Is there anyway for the robot to continue with the next client, if one client’s account couldnt be logged in or couldnt download the files?
You can use Write Cell activity or update status directly into DataTable and at the end of all rows you can write the data back into Excel file.
You should enclose that flow inside Try Catch block to handle password expired or any other error. So that it Bot will go the next client if any error occurred also.
I suggest you to use ReFramework template for this process if you are not using it.
Use an Element Exists on an element on the Webpage after you login(Something unique which is only present once you login) and if that evaluates to False(use If Activity) then update the Status column in the Excel tracker as “Failure”.
Use a excel application scope and pass filepath as input and inside her scope use read range activity and get the output as datatable named dt
Now use a add data column activity and mention the ColumnName as Login Status and datatable as dt which we can use to denote whether it logged in successfully or not
Use one more add data column act and mention ColumnName as Overall Status and datatable as dt
This we can use to update overall status whether file was downloaded successfully and moved to a folder
Then use a FOR EACH ROW activity and pass dt as input
Inside the loop use a OPEN BROWSER activity and pass CurrentRow(“URL ColumnName”).ToString as input which will let open the url to open in browser
Then followed by that use a TYPE INTO activity and pass the column name which holds the username and password may be like this
CurrentRow(“username”).ToString
And another type into activity with input as
CurrentRow(“password”).ToString
Now inside the same LOOP use a ELEMENT EXISTS activity
with that choose any element that would come for sure once the page has logged in and get the output as bool_exists
Use a IF activity and mention the condition as bool_exists = True
If true it goes to then block where use a assign activity like this
If it’s true then inside the same THEN block keep all the other activities to download and moving the file to specific folder and leave the else block with that one specific assign activity alone
This will go in loop now as all the activities so far are inside the loop
Next to for each row loop now use a write range activity and mention dt as input and enable add headers
This will write on top of the existing table in excel with Login status as well
@Vijay_Manimaran If the passwords are not correct then it must be showing an error. If this is the case then follow below steps
Take flowchart, Enter Username
Enter pwd
Check if that error exists using flow decision
If that present then update the value to excel or datatable. If you are updating to data table at the end of the process you have to write to excel at once.
Close All applications
Continue the process by looping back to the sequence where username and pwd were entering