Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/api/class-apirequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/src/api/class-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-browsertype.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-cdpsession.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Optional method parameters.
Optional method parameters.

## method: CDPSession.event
* since: v.1.30
* since: v1.30
* langs: csharp
- returns: <[CDPSessionEvent]>

Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/class-cdpsessionevent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]>
1 change: 0 additions & 1 deletion docs/src/api/class-elementhandle.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion docs/src/api/class-locator.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion docs/src/api/class-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/emulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions docs/src/test-api/class-fullconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/src/test-api/class-testconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/src/test-cli-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ npx playwright merge-reports ./reports
| Option | Description |
| :--- | :--- |
| `-c, --config <file>` | Configuration file. Can be used to specify additional configuration for the output report |
| `--reporter <reporter>` | Reporter to use, comma-separated, can be "list", "line", "dot", "json", "junit", "null", "github", "html", "blob" (default: "list") |
| `--reporter <reporter>` | Reporter to use, comma-separated, can be "list", "line", "dot", "json", "junit", "null", "github", "html", "blob", "perfetto" (default: "list") |

### Clear Cache

Expand Down
2 changes: 2 additions & 0 deletions docs/src/trace-viewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions docs/src/videos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions packages/playwright/types/test.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
* ```
*
*/
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
Expand Down Expand Up @@ -2058,7 +2058,7 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
argv: Array<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.
*/
configFile?: string;

Expand Down
2 changes: 1 addition & 1 deletion utils/generate_types/overrides-test.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });

interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
projects?: Project<TestArgs, WorkerArgs>[];
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<TestArgs, WorkerArgs>;
webServer?: TestConfigWebServer | TestConfigWebServer[];
}
Expand Down