Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

doc: even more documentation fixes

Paveld094c602a738
diff --git a/docs/api.md b/docs/api.md
index b52d700685..76156ea44c 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -110,7 +110,7 @@
* [page.pdf](#pagepdf)
* [page.reload([options])](#pagereloadoptions)
* [page.screenshot([options])](#pagescreenshotoptions)
- * [page.select(selector, ...values)](#pageselectselector-values)
+ * [page.select(selector, value, options)](#pageselectselector-value-options)
* [page.setCacheEnabled([enabled])](#pagesetcacheenabledenabled)
* [page.setContent(html[, options])](#pagesetcontenthtml-options)
* [page.setDefaultNavigationTimeout(timeout)](#pagesetdefaultnavigationtimeouttimeout)
@@ -186,7 +186,7 @@
* [frame.isDetached()](#frameisdetached)
* [frame.name()](#framename)
* [frame.parentFrame()](#frameparentframe)
- * [frame.select(selector, values, options)](#frameselectselector-values-options)
+ * [frame.select(selector, value, options)](#frameselectselector-value-options)
* [frame.setContent(html[, options])](#framesetcontenthtml-options)
* [frame.title()](#frametitle)
* [frame.tripleclick(selector[, options])](#frametripleclickselector-options)
@@ -514,7 +514,7 @@ Indicates that the browser is connected.
- `isLandscape` <[boolean]> Specifies if viewport is in landscape mode. Defaults to `false`.
- `userAgent` <?[string]> Specific user agent to use in this page
- `mediaType` <?"screen"|"print"> Changes the CSS media type of the page.
- - `colorScheme` <?"dark"|"light"> Emulates `'prefers-colors-scheme'` media feature.
+ - `colorScheme` <?"dark"|"light"|"no-preference"> Emulates `'prefers-colors-scheme'` media feature.
- `javaScriptEnabled` <?[boolean]> Whether or not to enable or disable JavaScript in the page. Defaults to true.
- `timezoneId` <?[string]> Changes the timezone of the page. See [ICU’s `metaZones.txt`](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1) for a list of supported timezone IDs.
- returns: <[Promise]<[BrowserContext]>>
diff --git a/src/input.ts b/src/input.ts
index ce41b1cfab..a3e23d2a4f 100644
--- a/src/input.ts
+++ b/src/input.ts
@@ -406,5 +406,5 @@ export type FilePayload = {
export type MediaType = 'screen' | 'print';
export const mediaTypes: Set<MediaType> = new Set(['screen', 'print']);
-export type ColorScheme = 'dark' | 'light';
-export const mediaColorSchemes: Set<ColorScheme> = new Set(['dark', 'light']);
+export type ColorScheme = 'dark' | 'light' | 'no-preference';
+export const mediaColorSchemes: Set<ColorScheme> = new Set(['dark', 'light', 'no-preference']);