Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: add a note on download file name (#7473)
Yury Semikhatskya481de0871f0
diff --git a/docs/src/api/class-download.md b/docs/src/api/class-download.mdindex 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 willwait 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.saveAsCopy the download to a user-specified path. It is safe to call this method while the downloaddiff --git a/types/types.d.ts b/types/types.d.tsindex 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<null|string>;