Hey everyone. So right now i have a bot which clicks links and that opens a browser popup window with a captcha. Once i finish the captcha a file gets downloaded. Is there any way to monitor the downloads folder to check if my file has been downloaded? Also the browser doesnt load at times and is there a way i can fix that problem? (P.S I tried with wait for download and that didnt work as i have to write a loop and perform the ocr until the captcha is solved so there isnt a single activity i can perform to wait for download).
Hi @tejas.ma ,
Have many way to check download file success
1.Use can check file path exist in folder download
2.Check your element exist in your website
regards,
Hi @tejas.ma
For monitor download folder, use Wait for Download Activity
For Retry activity, you can use Retry Scope with combination of Check True Activity like this
If the Activities inside Retry Scope fail before assign CaptchaSolved as True, it will retry x times as you defining in Retry Properties
In wait for download you need not use one single activity…you can use group of activities also
Cheers
Hi @tejas.ma
Can you try this
Initialize a Boolean variable to check if the file has been downloaded
fileDownloaded As Boolean = False
While Not fileDownloaded
‘Check if the file exists’
fileDownloaded = File.Exists(“YourDownloadFolderPath\YourFileName”)
If Not fileDownloaded Then
‘If the file isn’t found, wait for a bit before trying again’
Delay (e.g., 5 seconds)
End If
End While
Hi @tejas.ma,
Trigger scope will monitor/check the desired folder, if any changes happened in the folder bot will understand that file got created, deleted, move etc.
Hope this will be helpful !!
Thanks in advance,
Jayavignesh G