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(video): document cursor option of recordVideo.showActions (#41834)
Yury Semikhatsky9ce727797c9d
diff --git a/docs/src/api/params.md b/docs/src/api/params.mdindex aca66190bb..6a92a8474a 100644--- a/docs/src/api/params.md+++ b/docs/src/api/params.md@@ -841,6 +841,7 @@ When set to `minimal`, only record information necessary for routing from HAR. T- `duration` ?<[float]> How long each annotation is displayed in milliseconds. Defaults to `500`.- `position` ?<[AnnotatePosition]<"top-left"|"top"|"top-right"|"bottom-left"|"bottom"|"bottom-right">> Position of the action title overlay. Defaults to `"top-right"`.- `fontSize` ?<[int]> Font size of the action title in pixels. Defaults to `24`.+ - `cursor` ?<[ScreencastCursor]<"none"|"pointer">> Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded. Makesure to await [`method: BrowserContext.close`] for videos to be saved.diff --git a/docs/src/test-api/class-testoptions.md b/docs/src/test-api/class-testoptions.mdindex 813a37f3ac..8808b14ece 100644--- a/docs/src/test-api/class-testoptions.md+++ b/docs/src/test-api/class-testoptions.md@@ -645,6 +645,7 @@ export default defineConfig({- `duration` ?<[float]> How long each annotation is displayed in milliseconds. Defaults to `500`.- `position` ?<[AnnotatePosition]<"top-left"|"top"|"top-right"|"bottom-left"|"bottom"|"bottom-right">> Position of the action title overlay. Defaults to `"top-right"`.- `fontSize` ?<[int]> Font size of the action title in pixels. Defaults to `24`.+ - `cursor` ?<[ScreencastCursor]<"none"|"pointer">> Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.- `test` ?<[Object]> Controls test information displayed as a status overlay in the video.- `level` ?<[TestAnnotationLevel]<"file"|"test"|"step">> Level of the detail to include about the current test.- `position` ?<[AnnotatePosition]<"top-left"|"top"|"top-right"|"bottom-left"|"bottom"|"bottom-right">> Position of the test information overlay. Defaults to `"top-left"`.diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.tsindex d24168c61f..0b3086a126 100644--- a/packages/playwright-client/types/types.d.ts+++ b/packages/playwright-client/types/types.d.ts@@ -11363,6 +11363,12 @@ export interface Browser {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -17406,6 +17412,12 @@ export interface BrowserType<Unused = {}> {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -23657,6 +23669,12 @@ export interface Electron {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -24345,6 +24363,12 @@ export interface AndroidDevice {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -25548,6 +25572,12 @@ export interface BrowserContextOptions {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex d24168c61f..0b3086a126 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -11363,6 +11363,12 @@ export interface Browser {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -17406,6 +17412,12 @@ export interface BrowserType<Unused = {}> {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -23657,6 +23669,12 @@ export interface Electron {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -24345,6 +24363,12 @@ export interface AndroidDevice {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};@@ -25548,6 +25572,12 @@ export interface BrowserContextOptions {* Font size of the action title in pixels. Defaults to `24`.*/fontSize?: number;++ /**+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from+ * the previous action point to the next one. `"none"` disables the cursor decoration.+ */+ cursor?: "none"|"pointer";};};diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.tsindex d318379841..44d6742a8c 100644--- a/packages/playwright/types/test.d.ts+++ b/packages/playwright/types/test.d.ts@@ -7043,7 +7043,7 @@ export interface PlaywrightWorkerOptions {** Learn more about [recording video](https://playwright.dev/docs/test-use-options#recording-options).*/- video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize, show?: { actions?: { duration?: number, position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number }, test?: { level?: 'file' | 'title' | 'step', position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number } } };+ video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize, show?: { actions?: { duration?: number, position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number, cursor?: 'none' | 'pointer' }, test?: { level?: 'file' | 'title' | 'step', position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number } } };}export type ScreenshotMode = 'off' | 'on' | 'only-on-failure' | 'on-first-failure';diff --git a/utils/generate_types/overrides-test.d.ts b/utils/generate_types/overrides-test.d.tsindex f06954a448..713979b3bf 100644--- a/utils/generate_types/overrides-test.d.ts+++ b/utils/generate_types/overrides-test.d.ts@@ -263,7 +263,7 @@ export interface PlaywrightWorkerOptions {connectOptions: ConnectOptions | undefined;screenshot: ScreenshotMode | { mode: ScreenshotMode } & Pick<PageScreenshotOptions, 'fullPage' | 'omitBackground'>;trace: TraceMode | /** deprecated */ 'retry-with-trace' | { mode: TraceMode, snapshots?: boolean, screenshots?: boolean, sources?: boolean, attachments?: boolean };- video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize, show?: { actions?: { duration?: number, position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number }, test?: { level?: 'file' | 'title' | 'step', position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number } } };+ video: VideoMode | /** deprecated */ 'retry-with-video' | { mode: VideoMode, size?: ViewportSize, show?: { actions?: { duration?: number, position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number, cursor?: 'none' | 'pointer' }, test?: { level?: 'file' | 'title' | 'step', position?: 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right', fontSize?: number } } };}export type ScreenshotMode = 'off' | 'on' | 'only-on-failure' | 'on-first-failure';