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: update phrasing for 1.40 features (#28113)
Dmitry Gozmanec4893d23580
diff --git a/docs/src/api/class-download.md b/docs/src/api/class-download.mdindex 8f54048c9f..3333d36996 100644--- a/docs/src/api/class-download.md+++ b/docs/src/api/class-download.md@@ -72,7 +72,7 @@ Upon successful cancellations, `download.failure()` would resolve to `'canceled'* langs: java, js, csharp- returns: <[Readable]>-Returns readable stream for current download or `null` if download failed.+Returns a readable stream for a successful download, or throws for a failed/canceled download.## async method: Download.delete* since: v1.8@@ -95,8 +95,7 @@ Get the page that the download belongs to.* since: v1.8- returns: <[path]>-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.+Returns path to the downloaded file for a successful download, or throws for a failed/canceled 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.diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.mdindex 62a61e808e..1a7297be31 100644--- a/docs/src/api/class-elementhandle.md+++ b/docs/src/api/class-elementhandle.md@@ -322,13 +322,16 @@ default.Since [`param: eventInit`] is event-specific, please refer to the events documentation for the lists of initialproperties:+* [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+* [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)-* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+* [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.mdindex 5ea3d8e6e0..336ba55bd3 100644--- a/docs/src/api/class-frame.md+++ b/docs/src/api/class-frame.md@@ -382,13 +382,16 @@ default.Since [`param: eventInit`] is event-specific, please refer to the events documentation for the lists of initialproperties:+* [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+* [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)-* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+* [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.mdindex f74c82367d..5781878f6f 100644--- a/docs/src/api/class-locator.md+++ b/docs/src/api/class-locator.md@@ -561,13 +561,16 @@ default.Since [`param: eventInit`] is event-specific, please refer to the events documentation for the lists of initialproperties:+* [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+* [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)-* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+* [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)You can also specify [JSHandle] as the property value if you want live objects to be passed into the event:diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.mdindex c6a9418ce0..e875547905 100644--- a/docs/src/api/class-page.md+++ b/docs/src/api/class-page.md@@ -954,13 +954,16 @@ default.Since [`param: eventInit`] is event-specific, please refer to the events documentation for the lists of initialproperties:+* [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+* [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)-* [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+* [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex 8483e5af54..51979c06cd 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -2124,13 +2124,16 @@ export interface Page {* properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.** Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:+ * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+ * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+ * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)- * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+ * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)** You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:*@@ -5736,13 +5739,16 @@ export interface Frame {* properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.** Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:+ * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+ * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+ * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)- * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+ * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)** You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:*@@ -9654,13 +9660,16 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {* properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.** Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:+ * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+ * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+ * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)- * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+ * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)** You can also specify `JSHandle` as the property value if you want live objects to be passed into the event:*@@ -11023,13 +11032,16 @@ export interface Locator {* properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.** Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:+ * - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)+ * - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)+ * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)* - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent)* - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent)* - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent)* - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)* - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)- * - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)+ * - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)** You can also specify {@link JSHandle} as the property value if you want live objects to be passed into the event:*@@ -16919,7 +16931,7 @@ export interface Download {cancel(): Promise<void>;/**- * Returns readable stream for current download or `null` if download failed.+ * Returns a readable stream for a successful download, or throws for a failed/canceled download.*/createReadStream(): Promise<Readable>;@@ -16939,8 +16951,8 @@ export interface Download {page(): Page;/**- * 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.+ * Returns path to the downloaded file for a successful download, or throws for a failed/canceled 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