So I am saving a WebPage from IE using ‘Ctrl+P’
I follow these steps:
On the WebPage Send HotKey ‘Ctrl+P’ Print Dialog Box Appears
Double Click on ‘Microsoft Print to PDF’ File Save Dialog Box Appears
Use Type Into to type the Save Location and Enter.
And the File gets downloaded.
Now my Query is, How will the Bot Identify whether the Download or saving is completed.
Because in this scenario there is no Update on the screen visible to identify it.
I mean, when I try this it is present but still in use.
Like if the file is of 1000Kb.
In the start it will be 10kb and then 20kb and so on. So the Path exists but in use.
It depends on Machine and Network Speed.
It will be perfect if I can find if the file is idol and then perform other steps on it.
The Filename is different when you download a file from IE.
In my case I am saving file using print dialog box ‘Ctrl+P’
The File name is abc.pdf from start till end until it gets downloaded.
Similarly like you copy a file from Folder A to Folder B, the name is same but the size increases as the File gets copied.
You can use C# code to check the latest file in the directory and extract the extension of the file. If it matches with the key then it will work for you.
You can use delay based on your analysis like in how much time it will take to complete and execute step 1.
You can use download pop-up of IE and use element exist activity to look for Completed/Finish button.
The filesize is not Same in all the cases. It varies.
But I have implemented something which is on similar lines:
Upon analyzing I understood that, While the file gets downloaded in the Background it changes from 0kb to directly Whatever the size is.
So after download click → I am checking if the file size → if zero → check again → If not - > the download is Completed.