diff --git a/dotnet/docs/api/class-elementhandle.mdx b/dotnet/docs/api/class-elementhandle.mdx index c2eecb5ed4..debe9183bb 100644 --- a/dotnet/docs/api/class-elementhandle.mdx +++ b/dotnet/docs/api/class-elementhandle.mdx @@ -1076,7 +1076,7 @@ await ElementHandle.ScreenshotAsync(options); The file path to save the image to. The screenshot type will be inferred from file extension. If [Path](/api/class-elementhandle.mdx#element-handle-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `Quality` [int]? *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `Scale` `enum ScreenshotScale { Css, Device }?` *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -1088,7 +1088,7 @@ await ElementHandle.ScreenshotAsync(options); - `Timeout` [float]? *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `Type` `enum ScreenshotType { Png, Jpeg }?` *(optional)*# + - `Type` `enum ScreenshotType { Png, Jpeg, Webp }?` *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/dotnet/docs/api/class-locator.mdx b/dotnet/docs/api/class-locator.mdx index 991a5c42b9..faecaa6288 100644 --- a/dotnet/docs/api/class-locator.mdx +++ b/dotnet/docs/api/class-locator.mdx @@ -2081,7 +2081,7 @@ await page.GetByRole(AriaRole.Link).ScreenshotAsync(new() { The file path to save the image to. The screenshot type will be inferred from file extension. If [Path](/api/class-locator.mdx#locator-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `Quality` [int]? *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `Scale` `enum ScreenshotScale { Css, Device }?` *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -2093,7 +2093,7 @@ await page.GetByRole(AriaRole.Link).ScreenshotAsync(new() { - `Timeout` [float]? *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `Type` `enum ScreenshotType { Png, Jpeg }?` *(optional)*# + - `Type` `enum ScreenshotType { Png, Jpeg, Webp }?` *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/dotnet/docs/api/class-page.mdx b/dotnet/docs/api/class-page.mdx index b1c6c4a17d..c389de9065 100644 --- a/dotnet/docs/api/class-page.mdx +++ b/dotnet/docs/api/class-page.mdx @@ -2468,7 +2468,7 @@ await Page.ScreenshotAsync(options); The file path to save the image to. The screenshot type will be inferred from file extension. If [Path](/api/class-page.mdx#page-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `Quality` [int]? *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `Scale` `enum ScreenshotScale { Css, Device }?` *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -2480,7 +2480,7 @@ await Page.ScreenshotAsync(options); - `Timeout` [float]? *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `Type` `enum ScreenshotType { Png, Jpeg }?` *(optional)*# + - `Type` `enum ScreenshotType { Png, Jpeg, Webp }?` *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/java/docs/api/class-elementhandle.mdx b/java/docs/api/class-elementhandle.mdx index 2b4deca915..58275fa394 100644 --- a/java/docs/api/class-elementhandle.mdx +++ b/java/docs/api/class-elementhandle.mdx @@ -1085,7 +1085,7 @@ ElementHandle.screenshot(options); The file path to save the image to. The screenshot type will be inferred from file extension. If [setPath](/api/class-elementhandle.mdx#element-handle-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `setQuality` [int] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `setScale` `enum ScreenshotScale { CSS, DEVICE }` *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -1097,7 +1097,7 @@ ElementHandle.screenshot(options); - `setTimeout` [double] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `setType` `enum ScreenshotType { PNG, JPEG }` *(optional)*# + - `setType` `enum ScreenshotType { PNG, JPEG, WEBP }` *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/java/docs/api/class-locator.mdx b/java/docs/api/class-locator.mdx index 0135fa50b9..24514c8911 100644 --- a/java/docs/api/class-locator.mdx +++ b/java/docs/api/class-locator.mdx @@ -2084,7 +2084,7 @@ page.getByRole(AriaRole.LINK).screenshot(new Locator.ScreenshotOptions() The file path to save the image to. The screenshot type will be inferred from file extension. If [setPath](/api/class-locator.mdx#locator-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `setQuality` [int] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `setScale` `enum ScreenshotScale { CSS, DEVICE }` *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -2096,7 +2096,7 @@ page.getByRole(AriaRole.LINK).screenshot(new Locator.ScreenshotOptions() - `setTimeout` [double] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `setType` `enum ScreenshotType { PNG, JPEG }` *(optional)*# + - `setType` `enum ScreenshotType { PNG, JPEG, WEBP }` *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/java/docs/api/class-page.mdx b/java/docs/api/class-page.mdx index 581cd892b2..5cda5f2ec0 100644 --- a/java/docs/api/class-page.mdx +++ b/java/docs/api/class-page.mdx @@ -1995,7 +1995,7 @@ Page.screenshot(options); The file path to save the image to. The screenshot type will be inferred from file extension. If [setPath](/api/class-page.mdx#page-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `setQuality` [int] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `setScale` `enum ScreenshotScale { CSS, DEVICE }` *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -2007,7 +2007,7 @@ Page.screenshot(options); - `setTimeout` [double] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `setType` `enum ScreenshotType { PNG, JPEG }` *(optional)*# + - `setType` `enum ScreenshotType { PNG, JPEG, WEBP }` *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/nodejs/docs/api/class-elementhandle.mdx b/nodejs/docs/api/class-elementhandle.mdx index 610599b166..daf88bafbc 100644 --- a/nodejs/docs/api/class-elementhandle.mdx +++ b/nodejs/docs/api/class-elementhandle.mdx @@ -1108,7 +1108,7 @@ await elementHandle.screenshot(options); The file path to save the image to. The screenshot type will be inferred from file extension. If [path](/api/class-elementhandle.mdx#element-handle-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `quality` [number] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `scale` "css" | "device" *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -1123,7 +1123,7 @@ await elementHandle.screenshot(options); - `timeout` [number] *(optional)*# Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `type` "png" | "jpeg" *(optional)*# + - `type` "png" | "jpeg" | "webp" *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/nodejs/docs/api/class-locator.mdx b/nodejs/docs/api/class-locator.mdx index 9ea2529fd4..e930534b97 100644 --- a/nodejs/docs/api/class-locator.mdx +++ b/nodejs/docs/api/class-locator.mdx @@ -2181,7 +2181,7 @@ await page.getByRole('link').screenshot({ animations: 'disabled', path: 'link.pn The file path to save the image to. The screenshot type will be inferred from file extension. If [path](/api/class-locator.mdx#locator-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `quality` [number] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `scale` "css" | "device" *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -2196,7 +2196,7 @@ await page.getByRole('link').screenshot({ animations: 'disabled', path: 'link.pn - `timeout` [number] *(optional)*# Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `type` "png" | "jpeg" *(optional)*# + - `type` "png" | "jpeg" | "webp" *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/nodejs/docs/api/class-page.mdx b/nodejs/docs/api/class-page.mdx index 549893e05e..ff2f002f78 100644 --- a/nodejs/docs/api/class-page.mdx +++ b/nodejs/docs/api/class-page.mdx @@ -1990,7 +1990,7 @@ await page.screenshot(options); The file path to save the image to. The screenshot type will be inferred from file extension. If [path](/api/class-page.mdx#page-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `quality` [number] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `scale` "css" | "device" *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -2005,7 +2005,7 @@ await page.screenshot(options); - `timeout` [number] *(optional)*# Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods. - - `type` "png" | "jpeg" *(optional)*# + - `type` "png" | "jpeg" | "webp" *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/nodejs/docs/api/class-reporter.mdx b/nodejs/docs/api/class-reporter.mdx index 81f0a45686..82360408ae 100644 --- a/nodejs/docs/api/class-reporter.mdx +++ b/nodejs/docs/api/class-reporter.mdx @@ -384,7 +384,7 @@ await reporter.preprocessSuite(config, suite); The root suite that contains the projects, files and test cases that will run. - The suite reflects `--project`, `--grep`/`--grep-invert` and `.only` filtering, so it only contains tests that match the current invocation. It contains only the top-level projects being run — setup and dependency projects are not included and cannot be excluded from here. + The suite reflects `--project`, `--grep`/`--grep-invert` and `.only` filtering, so it only contains tests that match the current invocation. Setup and dependency projects are readonly and cannot be excluded from here. The suite ignores the `--shard` argument: it always contains the full, un-sharded corpus. Playwright applies its built-in sharding after [reporter.preprocessSuite()](/api/class-reporter.mdx#reporter-preprocess-suite) returns, unless the returned `implementsSharding` is `true`. diff --git a/python/docs/api/class-elementhandle.mdx b/python/docs/api/class-elementhandle.mdx index d0cee42185..49ed793913 100644 --- a/python/docs/api/class-elementhandle.mdx +++ b/python/docs/api/class-elementhandle.mdx @@ -1245,7 +1245,7 @@ element_handle.screenshot(**kwargs) The file path to save the image to. The screenshot type will be inferred from file extension. If [path](/api/class-elementhandle.mdx#element-handle-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `quality` [int] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `scale` "css" | "device" *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -1257,7 +1257,7 @@ element_handle.screenshot(**kwargs) - `timeout` [float] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [browser_context.set_default_timeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.set_default_timeout()](/api/class-page.mdx#page-set-default-timeout) methods. -- `type` "png" | "jpeg" *(optional)*# +- `type` "png" | "jpeg" | "webp" *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/python/docs/api/class-locator.mdx b/python/docs/api/class-locator.mdx index 96e9cd7fa7..03325fc11d 100644 --- a/python/docs/api/class-locator.mdx +++ b/python/docs/api/class-locator.mdx @@ -2825,7 +2825,7 @@ await page.get_by_role("link").screenshot(animations="disabled", path="link.png" The file path to save the image to. The screenshot type will be inferred from file extension. If [path](/api/class-locator.mdx#locator-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `quality` [int] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `scale` "css" | "device" *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -2837,7 +2837,7 @@ await page.get_by_role("link").screenshot(animations="disabled", path="link.png" - `timeout` [float] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [browser_context.set_default_timeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.set_default_timeout()](/api/class-page.mdx#page-set-default-timeout) methods. -- `type` "png" | "jpeg" *(optional)*# +- `type` "png" | "jpeg" | "webp" *(optional)*# Specify screenshot type, defaults to `png`. diff --git a/python/docs/api/class-page.mdx b/python/docs/api/class-page.mdx index 7edd8c80dd..38b9174f89 100644 --- a/python/docs/api/class-page.mdx +++ b/python/docs/api/class-page.mdx @@ -2994,7 +2994,7 @@ page.screenshot(**kwargs) The file path to save the image to. The screenshot type will be inferred from file extension. If [path](/api/class-page.mdx#page-screenshot-option-path) is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. - `quality` [int] *(optional)*# - The quality of the image, between 0-100. Not applicable to `png` images. + The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression. - `scale` "css" | "device" *(optional)*# When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. @@ -3006,7 +3006,7 @@ page.screenshot(**kwargs) - `timeout` [float] *(optional)*# Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [browser_context.set_default_timeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.set_default_timeout()](/api/class-page.mdx#page-set-default-timeout) methods. -- `type` "png" | "jpeg" *(optional)*# +- `type` "png" | "jpeg" | "webp" *(optional)*# Specify screenshot type, defaults to `png`.