Hi, I’m trying to download file using playwright library but get stuck on error.
${dl_promise} Promise To Wait For Download ${TEMPDIR}
Click button[name='DownloadButton']
${file_obj}= Wait For ${dl_promise}
Result is error
Error: download.saveAs: EPERM: operation not permitted, copyfile
'C:\Users\Raivo\AppData\Local\robocorp\temp\bb3cd54a34e55f3f\playwright-artifacts-sjJRyH\70c17940-4354-48b8-aa4e-a351d0d820c6' ->
'C:\Users\Raivo\AppData\Local\robocorp\temp\bb3cd54a34e55f3f'
Any pointer on this? Also I’m using this template
Got it to work, seems now also filename is excepted. Or at least was needed on my case
4 Likes
jani
July 30, 2021, 2:54pm
3
Yes, the old Robot Framework Browser docs did not mention that the filename was required. Now that issue is resolved (Promise To Wait For Download keyword documentation issue · Issue #949 · MarketSquare/robotframework-browser · GitHub ).
warrene
December 13, 2022, 10:49am
4
I used this syntax for handling the windows vs unix environments:
${dl_promise} Promise To Wait For Download ${CURDIR}${/}output${/}${FILENAME}
Where FILENAME was declared in the Variable section.
Regards,
Warren
Error: download.saveAs: canceled
getting this error in ${dl_promise}
raivo
May 10, 2023, 2:04pm
6
According error download was canceled? If it big file you are downloading maybe its needed to increase timeouts.
ok, where I need to give the browser timeout. Promise To Wait For Download doesn’t have any timeout argument
raivo
May 11, 2023, 5:24am
8
You can change timeouts before the download for example and set it back later. Also if you can determine file url you could use Download
keyword to get the file.