docs: fix the downloadsPath docs (#7726)

Closes #7707
This commit is contained in:
Pavel Feldman 2021-07-19 14:56:28 -07:00 committed by GitHub
parent 2ac0c59156
commit 1ab41babb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View file

@ -2,8 +2,8 @@
[Download] objects are dispatched by page via the [`event: Page.download`] event.
If `downloadsPath` isn't specified, all the downloaded files belonging to the browser context are deleted when the
browser context is closed. And all downloaded files are deleted when the browser closes.
All the downloaded files belonging to the browser context are deleted when the
browser context is closed.
Download event is emitted once the download starts. Download path becomes available once download completes:

View file

@ -14,7 +14,7 @@ can obtain the download url, file system path and payload stream using the [Down
You can specify where to persist downloaded files using the [`option: downloadsPath`] option in [`method: BrowserType.launch`].
:::note
Unless [`option: downloadsPath`] is set, downloaded files are deleted when the browser context that produced them is closed.
Downloaded files are deleted when the browser context that produced them is closed.
:::
Here is the simplest way to handle the file download:

3
types/types.d.ts vendored
View file

@ -9259,8 +9259,7 @@ export interface Dialog {
* [Download] objects are dispatched by page via the
* [page.on('download')](https://playwright.dev/docs/api/class-page#page-event-download) event.
*
* If `downloadsPath` isn't specified, all the downloaded files belonging to the browser context are deleted when the
* browser context is closed. And all downloaded files are deleted when the browser closes.
* All the downloaded files belonging to the browser context are deleted when the browser context is closed.
*
* Download event is emitted once the download starts. Download path becomes available once download completes:
*