diff --git a/docs/src/api/class-download.md b/docs/src/api/class-download.md index 05f8f654c8..d5b4ba336d 100644 --- a/docs/src/api/class-download.md +++ b/docs/src/api/class-download.md @@ -93,6 +93,9 @@ Get the page that the download belongs to. Returns path to the downloaded file in case of successful download. The method will wait for the download to finish if necessary. The method throws when connected remotely. +Note that the download's file name is a random GUID, use [`method: Download.suggestedFilename`] +to get suggested file name. + ## async method: Download.saveAs Copy the download to a user-specified path. It is safe to call this method while the download diff --git a/types/types.d.ts b/types/types.d.ts index 9391053fef..9c473a432c 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -9624,6 +9624,10 @@ export interface Download { /** * Returns path to the downloaded file in case of successful download. The method will wait for the download to finish if * necessary. The method throws when connected remotely. + * + * Note that the download's file name is a random GUID, use + * [download.suggestedFilename()](https://playwright.dev/docs/api/class-download#download-suggested-filename) to get + * suggested file name. */ path(): Promise;