diff --git a/docs/src/api/class-apirequest.md b/docs/src/api/class-apirequest.md index d27e22b03410a..8e44714334bf7 100644 --- a/docs/src/api/class-apirequest.md +++ b/docs/src/api/class-apirequest.md @@ -13,7 +13,7 @@ see [APIRequestContext]. Creates new instances of [APIRequestContext]. ### option: APIRequest.newContext.clientCertificates = %%-context-option-clientCertificates-%% -* since: 1.46 +* since: v1.46 ### option: APIRequest.newContext.useragent = %%-context-option-useragent-%% * since: v1.16 diff --git a/docs/src/api/class-browser.md b/docs/src/api/class-browser.md index 2c07e98c57b2b..f1ac9ed98c35e 100644 --- a/docs/src/api/class-browser.md +++ b/docs/src/api/class-browser.md @@ -262,7 +262,7 @@ await browser.CloseAsync(); * since: v1.8 ### option: Browser.newContext.clientCertificates = %%-context-option-clientCertificates-%% -* since: 1.46 +* since: v1.46 ### option: Browser.newContext.storageState = %%-js-python-context-option-storage-state-%% * since: v1.8 @@ -290,7 +290,7 @@ testing frameworks should explicitly create [`method: Browser.newContext`] follo * since: v1.8 ### option: Browser.newPage.clientCertificates = %%-context-option-clientCertificates-%% -* since: 1.46 +* since: v1.46 ### option: Browser.newPage.storageState = %%-js-python-context-option-storage-state-%% * since: v1.8 diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.md index 1dad175eeca14..84146b7fa1b0c 100644 --- a/docs/src/api/class-browsertype.md +++ b/docs/src/api/class-browsertype.md @@ -373,7 +373,7 @@ Chromium/Chrome: Due to recent Chrome policy changes, automating the default Chr * since: v1.40 ### option: BrowserType.launchPersistentContext.clientCertificates = %%-context-option-clientCertificates-%% -* since: 1.46 +* since: v1.46 ## async method: BrowserType.launchServer * since: v1.8 diff --git a/docs/src/api/class-cdpsession.md b/docs/src/api/class-cdpsession.md index 1d581ffe1a6df..f2e40f7e26b16 100644 --- a/docs/src/api/class-cdpsession.md +++ b/docs/src/api/class-cdpsession.md @@ -141,7 +141,7 @@ Optional method parameters. Optional method parameters. ## method: CDPSession.event -* since: v.1.30 +* since: v1.30 * langs: csharp - returns: <[CDPSessionEvent]> diff --git a/docs/src/api/class-cdpsessionevent.md b/docs/src/api/class-cdpsessionevent.md index e5f317d0ec970..b89c8ec5b5558 100644 --- a/docs/src/api/class-cdpsessionevent.md +++ b/docs/src/api/class-cdpsessionevent.md @@ -12,6 +12,6 @@ Each object represents a named event and allows handling of the event when it is - argument: <[JsonElement?]> ## property: CDPSessionEvent.eventName -* since: 1.30 +* since: v1.30 * langs: csharp - returns: <[string]> \ No newline at end of file diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.md index 7f3a147ccde72..71a9634c636b3 100644 --- a/docs/src/api/class-elementhandle.md +++ b/docs/src/api/class-elementhandle.md @@ -802,7 +802,6 @@ Returns the buffer with the captured screenshot. ### option: ElementHandle.screenshot.signal = %%-input-signal-%% ### option: ElementHandle.screenshot.maskColor = %%-screenshot-option-mask-color-%% -* since: v1.34 ### option: ElementHandle.screenshot.style = %%-screenshot-option-style-%% * since: v1.41 diff --git a/docs/src/api/class-locator.md b/docs/src/api/class-locator.md index d7ee7012f0539..4fd5a33243569 100644 --- a/docs/src/api/class-locator.md +++ b/docs/src/api/class-locator.md @@ -2390,7 +2390,6 @@ Returns the buffer with the captured screenshot. ### option: Locator.screenshot.signal = %%-input-signal-%% ### option: Locator.screenshot.maskColor = %%-screenshot-option-mask-color-%% -* since: v1.34 ### option: Locator.screenshot.style = %%-screenshot-option-style-%% * since: v1.41 diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index f11c21ff36b6e..76b2caa056111 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -4056,7 +4056,6 @@ Returns the buffer with the captured screenshot. * since: v1.8 ### option: Page.screenshot.maskColor = %%-screenshot-option-mask-color-%% -* since: v1.34 ### option: Page.screenshot.style = %%-screenshot-option-style-%% * since: v1.41 diff --git a/docs/src/emulation.md b/docs/src/emulation.md index d05d07e6a255c..1e90737fbf57c 100644 --- a/docs/src/emulation.md +++ b/docs/src/emulation.md @@ -586,7 +586,7 @@ await context.SetGeolocationAsync(new Geolocation() { Longitude = 48.858455, Lat **Note** you can only change geolocation for all pages in the context. ## Color Scheme and Media -Emulate the users `"colorScheme"`. Supported values are 'light' and 'dark'. You can also emulate the media type with [`method: Page.emulateMedia`]. +Emulate the users `"colorScheme"`. Supported values are 'light', 'dark' and 'no-preference'. You can also emulate the media type with [`method: Page.emulateMedia`]. ```js title="playwright.config.ts" import { defineConfig } from '@playwright/test'; diff --git a/docs/src/test-api/class-fullconfig.md b/docs/src/test-api/class-fullconfig.md index 1dc08b869d7e5..cc61484b37604 100644 --- a/docs/src/test-api/class-fullconfig.md +++ b/docs/src/test-api/class-fullconfig.md @@ -19,7 +19,7 @@ any argument-parsing library. * since: v1.20 - type: ?<[string]> -Path to the configuration file used to run the tests. The value is an empty string if no config file was used. +Path to the configuration file used to run the tests. The value is `undefined` if no config file was used. ## property: FullConfig.failOnFlakyTests * since: v1.61 @@ -101,7 +101,7 @@ See [`property: TestConfig.quiet`]. ## property: FullConfig.reporter * since: v1.10 -- type: <[string]|[Array]<[Object]>|[BuiltInReporter]<"list"|"dot"|"line"|"github"|"json"|"junit"|"null"|"html"|"perfetto">> +- type: <[string]|[Array]<[Object]>|[BuiltInReporter]<"list"|"dot"|"line"|"github"|"json"|"junit"|"null"|"html"|"blob"|"perfetto">> - `0` <[string]> Reporter name or module or file path - `1` <[Object]> An object with reporter options if any diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.md index 0696f545a1070..ee9d9a6a5f55f 100644 --- a/docs/src/test-api/class-testconfig.md +++ b/docs/src/test-api/class-testconfig.md @@ -448,7 +448,7 @@ export default defineConfig({ ## property: TestConfig.reporter * since: v1.10 -- type: ?<[string]|[Array]<[Object]>|[BuiltInReporter]<"list"|"dot"|"line"|"github"|"json"|"junit"|"null"|"html"|"perfetto">> +- type: ?<[string]|[Array]<[Object]>|[BuiltInReporter]<"list"|"dot"|"line"|"github"|"json"|"junit"|"null"|"html"|"blob"|"perfetto">> - `0` <[string]> Reporter name or module or file path - `1` <[Object]> An object with reporter options if any diff --git a/docs/src/test-cli-js.md b/docs/src/test-cli-js.md index 7c187b1433d82..eaefb5f935ae2 100644 --- a/docs/src/test-cli-js.md +++ b/docs/src/test-cli-js.md @@ -317,7 +317,7 @@ npx playwright merge-reports ./reports | Option | Description | | :--- | :--- | | `-c, --config ` | Configuration file. Can be used to specify additional configuration for the output report | -| `--reporter ` | Reporter to use, comma-separated, can be "list", "line", "dot", "json", "junit", "null", "github", "html", "blob" (default: "list") | +| `--reporter ` | Reporter to use, comma-separated, can be "list", "line", "dot", "json", "junit", "null", "github", "html", "blob", "perfetto" (default: "list") | ### Clear Cache diff --git a/docs/src/trace-viewer.md b/docs/src/trace-viewer.md index ed5a855e5c22b..4fea3957bc384 100644 --- a/docs/src/trace-viewer.md +++ b/docs/src/trace-viewer.md @@ -123,6 +123,8 @@ Available options to record a trace: - `'off'` - Do not record a trace. - `'on'` - Record a trace for each test. (not recommended as it's performance heavy) - `'retain-on-failure'` - Record a trace for each test, but remove it from successful test runs. +- `'retain-on-first-failure'` - Record a trace only for the first run of a test, not for retries. Keep it only if that run failed. +- `'retain-on-failure-and-retries'` - Record a trace for every run, and keep it for any run that failed or that is a retry. You can also use `trace: 'retain-on-failure'` if you do not enable retries but still want traces for failed tests. diff --git a/docs/src/videos.md b/docs/src/videos.md index 07e1c322108e2..ea186e3636382 100644 --- a/docs/src/videos.md +++ b/docs/src/videos.md @@ -16,6 +16,9 @@ Playwright Test can record videos for your tests, controlled by the `video` opti - `'on'` - Record video for each test. - `'retain-on-failure'` - Record video for each test, but remove all videos from successful test runs. - `'on-first-retry'` - Record video only when retrying a test for the first time. +- `'on-all-retries'` - Record video for all test retries. +- `'retain-on-first-failure'` - Record video only for the first run of a test, not for retries. Keep it only if that run failed. +- `'retain-on-failure-and-retries'` - Record video for every run, and keep it for any run that failed or that is a retry. Video files will appear in the test output directory, typically `test-results`. See [`property: TestOptions.video`] for advanced video configuration. diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 43a7bf775c586..bdc53edd732fa 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -919,7 +919,7 @@ interface TestConfig { * ``` * */ - reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null'|'html'|'perfetto', string> | ReporterDescription[]; + reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null'|'html'|'blob'|'perfetto', string> | ReporterDescription[]; /** * Global options for all tests, for example * [testOptions.browserName](https://playwright.dev/docs/api/class-testoptions#test-options-browser-name). Learn more @@ -2058,7 +2058,7 @@ export interface FullConfig { argv: Array; /** - * Path to the configuration file used to run the tests. The value is an empty string if no config file was used. + * Path to the configuration file used to run the tests. The value is `undefined` if no config file was used. */ configFile?: string; diff --git a/utils/generate_types/overrides-test.d.ts b/utils/generate_types/overrides-test.d.ts index c65d5899e61ca..829fa862cb4c0 100644 --- a/utils/generate_types/overrides-test.d.ts +++ b/utils/generate_types/overrides-test.d.ts @@ -69,7 +69,7 @@ type LiteralUnion = T | (U & { zz_IGNORE_ME?: never }); interface TestConfig { projects?: Project[]; - reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null'|'html'|'perfetto', string> | ReporterDescription[]; + reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null'|'html'|'blob'|'perfetto', string> | ReporterDescription[]; use?: UseOptions; webServer?: TestConfigWebServer | TestConfigWebServer[]; }