In this process bot is downloading the file’s but sometime there is no files there to download so it clicks on download option and if there is no file that page only gets refreshed…But while downloading one file it clicks on download icon and page gets refreshed and it waits for long time in wait for download.
I get error like this-Wait for Download: No file detected in “C:\Users\Downloads” during the timeout period (1000 seconds). Increase the timeout if the file takes longer to download or check if the Downloads folder is correct.
Take “Wait for Download” Activity and Click on the download option
and basically timeout could be 30 seconds (30000 milliseconds), but you can adjust it
based on your download times.
after the “Wait for Download” activity Next use “File Exists” Activity and check the file exists or not in your specified folder and difault time is 30 sec if you required you can increase
Use an “If” activity to check the result of the “File Exists” activity.
If the file exists, proceed with your normal processing steps.
Then
└── Proceed with normal processing
Else
└── If the file does not exist, consider it as a failed download and handle it accordingly. perform any other error-handling actions.
I may misunderstand your question. But do you say that you try to download a file, but if there is no file, the download component waits for a long time until there is a timeout?
If this is a web page, you can try to check the URL-attribute of the button you try to click. If it’s blank, then you know that there is no file.
Check URL attribute of the button or link you are trying to click in a d reliable way to determine whether a file download will occur or not
1.After clicking the download button or link, add a “Get Attribute” activity to retrieve the URL attribute of the clicked element.
2.In the “Get Attribute” activity, specify the “href” attribute as the attribute you want to retrieve. This attribute typically holds the URL to which the download link points.
3. Use an “If” activity to check the result of the “Get Attribute” activity.
If the URL attribute is not blank, it indicates that a download link is present, and you can proceed with the download and processing steps.
*If the URL attribute is blank, you can consider that not file to download it .
Why are you using wait for downlod when there is no file to downlaod…it is expected behaviour of wait for downlod to throw error when file is not downloded…so please use a if condition to check if the downlaod started/there is a file to dowload and only then use wait for downlod
@Anil_G sometime there are files available sometime there is no files there to available…what will be the best way to avoid error?
Example-Let say if i click on a download icon to download a file sometime there are no file available to download so page get refreshed and there it comes like this Pdf 1.4% ??? Like this it comes if no pdf’s available to download.
It come like this pdf-1.4% ???
So i have taken element exist and if condition to handle it…but in one file bot is getting stucked in wait for download,And iam getting error.
@Anil_G
Steps for this process is
1.Bot is going to BSEindia website.
2.There it is selecting Today-1 date in start date and end date option
3.I have stored the keywords which is provided by user in array of string.
4.In Bse website there is a csv file after selecting start and end date iam downloading that csv input file from there.
5.Bot is reading the csv file and if it found the subject i mean from array it found the subject in csv it will download
@Anil_G because i need to download bluelink annexure file also and pdf also…sometime that bluelink file is not available to download… so inside wait for download i have performed all the required task to download.