Promise To Wait For Download -- how to increase timeout?

Hello, I have some tests which press a button to generate and download a PDF file. Sometimes it takes longer than 10 seconds to do this, and the test will fail. I am using the following piece of code:

${dl_promise} Promise To Wait For Download saveAs=C:/XXXX/Test.pdf wait_for_finished=True download_timeout=20s
Click selector=${PDF_Button}
${file_obj}= Wait For ${dl_promise}

The keyword ‘Promise To Wait For Download’ is embedded in promises.py and has the following code:

As you can see, there is a parameter for “download_timeout: Optional[timedelta] = None”, so it should be possible to set a longer timeout than the default 10 seconds. In my test script as shown above, I have tried to increase it to 20 seconds, but that doesn’t do anything. Every time it takes longer than 10 seconds to download the PDF, the test still fails with TimeoutError: page.waitForEvent: Timeout 10000ms exceeded while waiting for event “download”

So I am looking for a way to increase the timeout used in the promise, but I’m not sure how or where to change this correctly. I am also not sure about the syntax for this, do I write down the timeout in seconds or ms? Etc.

Thanks for helping me out!

Edit: I found this: download_timeout not used · Issue #3753 · MarketSquare/robotframework-browser · GitHub
It seems the global (browser) timeout if overriding the Promise timeout, so I should increase the global timeout. But I still don’t get why this keyword has its own timeout if it does nothing? For now I added “Set Browser Timeout 20 seconds scope=Task” before the promise, that seems to work.