-
Notifications
You must be signed in to change notification settings - Fork 59
browser.setDownloadBehavior
#970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
c21e5f3
to
fdc8565
Compare
0d841df
to
d5de8eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is worth discussing with the working group before doing an in-depth review.
I can see most automation libraries provide ways to set a download path, so that sounds like a useful feature. Libraries could already monitor downloads and move files manually to achieve the same effect, but still having it built in sounds more practical. And there are already preferences to drive this in most browsers anyway...
Regarding the API itself, I can see CDP has this on the Browser domain, but it also has the download events there, whereas for us they are on BrowsingContext. I would have expected this on BrowsingContext, but interested to know what others think.
865deea
to
79a5bb9
Compare
Testing libraries are not guaranteed to have access to the filesystem, so I would leave this logic to the browser.
The |
79a5bb9
to
438c004
Compare
@juliandescottes PTAL |
In puppeteer, there is a way to deny all the downloads, or allow for downloading to a custom folder. This PR is intended to provide a way to customize the download behavior per user context or globally.
Preview | Diff