All the downloaded files belonging to the browser context are deleted when the browser context is closed. All downloaded files are deleted when the browser closes.
Download event is emitted once the download starts. Download path becomes available once download completes:
download.createReadStream()
- returns: <
>
Returns readable stream for current download or if download failed.
download.delete()
- returns: <>
Deletes the downloaded file.
download.failure()
- returns: <
>
download.path()
- returns: <
>
Returns path to the downloaded file in case of successful download.
download.suggestedFilename()
- returns: <>
Returns suggested filename for this download. It is typically computed by the browser from the Content-Disposition
response header or the attribute. See the spec on . Different browsers can use different logic for computing it.