I am working on Create Yearly Report workflow.
I am having problems with saving the file using Type Into Activity and Click Save.
I used Assign ReportFilePath = path.Combine(Environment.CurrentDirectory,in_ReportsDownloadPath,“Report-”+in_TaxID+“-”+in_Year+“-”+item.ToString+“.csv”)
I used write Line to check and the path seems to be coming correct.
But the file is not saving with ReportFilePath name but with the generic Name called Report-RO123456-1.
In your type into activity, are you using the Simulate Type enabled? Try the solution given by @anil5 without the simulate type…
I have experienced this few times. In my cases, the issue seems to be the file is getting downloaded to a different folder that what we specify. So once we try to read it, it throws an error…
Use Build datatable activity and build a datatable with the columns in the CSV file and then append the downloaded report with the build datatable output.
On the On Element Appear activity there, there is a property named Repeat forever which is set to True in your screenshot. Change it value from True to False. Then it should work
@Lahiru.Fernando
There is NO Monthly report found for July. Instead of Clicking on the pop-up message window to close it, It is looking for the drop down window for download file. Therefore, I am getting an error.
Yes… you can handle this… So usually this message box appear when you click on the download button right?
So, after the click activity of the download button, you can actually include an Element Exists activity. For this activity, indicate the message box or the text that is shown in the message box. The output of this activity is a boolean value. Set the output property of this activity to a boolean variable.
Next, add a IF activity to check whether the element exists activity returned a true or false. So, if it returns true, that means the message box popped up and there is no report. If it returns false, that means there is a report to download. So all your current report download activities can be moved to the ELSE segment of the IF condition. For the THEN segment of the if condition, you can add another click activity to click on the OK button of the message box to close it
@Lahiru.Fernando
Yes. That is perfect. I used the same. This is the issue. The Element Exists is not waiting long enough to see if the Message window pops up. So it is assuming the Element exists is False and is moving to the ELSE segment.
I added a Delay in front of the Element exists. It is working fine now. The only issue is how much delay should I set it at.
Or is there any other way I can have it wait until the window pops up.