Skip to content

Implement downloading files via CDP or BiDi #2550

@asolntsev

Description

@asolntsev

Chome CDP has setDownloadBehavior method:
https://chromedevtools.github.io/devtools-protocol/tot/Browser/#method-setDownloadBehavior in Browser domain.

Here is the sample test subscribing to those events and printing the progress and completion
in Browser.downloadWillBegin listener.

url: https://scholar.harvard.edu/files/torman_personal/files/samplepptx.pptx
filename: samplepptx.pptx

in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: inProgress
in Browser.downloadProgress listener. state: completed
in Browser.downloadProgress listener. state: completed
Inspecting downloaded filename: f5a83cbd-97fb-451e-8651-618f63c1ec59
Verified downloaded file: f5a83cbd-97fb-451e-8651-618f63c1ec59 in /tmp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions