I have tried to use the keywords Promise To Wait For Download and Download when downloading a file from a site. But in both situations I get the error:
TypeError: Cannot read properties of undefined (reading ‘downloadsPath’)
I hope that someone can explain what I am doing wrong or if it is a bug cab guide me to a workaround.
I have created a simplified example that uses an external site. I am not allowed to upload it so is provided here:
*** Settings ***
Documentation Download test
Library RPA.Browser.Playwright enable_playwright_debug=True
*** Test Cases ***
Download File By Promise
New Browser chromium headless=False args=[“–start-maximized”] downloadsPath=/tmp
New Context viewport={‘width’: 1920, ‘height’: 1200} ignoreHTTPSErrors=True acceptDownloads=True
New Page http://xcal1.vodafone.co.uk/
${dl_promise}= Promise To Wait For Download saveAs=myfile.zip wait_for_finished=True download_timeout=60
Click //tbody/tr[16]/td[1]/a/img
${file_obj}= Wait For ${dl_promise}
Download File By Direct Link
New Browser chromium headless=False args=[“–start-maximized”] downloadsPath=/tmp
New Context viewport={‘width’: 1920, ‘height’: 1200} ignoreHTTPSErrors=True acceptDownloads=True
New Page http://xcal1.vodafone.co.uk/
${link}= Set Variable http://xcal1.vodafone.co.uk/5MB.zip
Download url=${link} saveAs=myfile.zip download_timeout=20