Version
1.62.1
Steps to reproduce
page.screencast.start()'s type definition still lists an annotate option, but that option was removed from the implementation in #39852 (shipped in v1.59.0). The type change was missed, so annotate is accepted by TypeScript while being silently ignored at runtime.
Minimal reproduction:
// annotate.spec.ts
import { test } from '@playwright/test';
test('screencast.start accepts annotate but ignores it', async ({ page }) => {
// `annotate` is declared on Screencast.start() in types.d.ts, so this COMPILES with no type error:
await page.screencast.start({
path: 'video.webm',
size: { width: 760, height: 420 },
annotate: { position: 'top-left', fontSize: 30 }, // ← removed from the runtime in #39852
});
// Add the supported API for comparison — this one DOES draw labels:
await page.screencast.showActions({ position: 'top-right' });
await page.setContent('<button style="margin:150px">Click me</button>');
await page.getByRole('button').click(); // would be labelled if `annotate` worked
await page.screencast.stop();
});
Run it, then open video.webm:
showActions labels appear in the top-right.
annotate: { position: 'top-left' } produces nothing in the top-left, and start() throws no error.
Expected behavior
The public types should match the implementation. Since annotate was intentionally removed from Screencast.start() (#39852), it should also be removed from packages/playwright-core/types/types.d.ts so TypeScript no longer offers/accepts a non-functional option. (Alternatively, if annotate on start() was meant to stay, restore the runtime support.)
Actual behavior
Screencast.start() still declares annotate in types.d.ts, so it type-checks and autocompletes, but it is never read by the client, never sent over the protocol, and has no effect on the recording. No error is raised, the option is silently dropped.
The removal PR #39852 cleaned annotate out of every layer except the generated types.
packages/playwright-core/types/types.d.ts was not part of that commit, so the option lingers there. On current main, start() in types.d.ts still has annotate, while client/screencast.ts start() does not read it.
Ref: https://github.com/microsoft/playwright/blob/main/packages/playwright-core/types/types.d.ts#L18764-L18768
Additional context
Environment
System:
OS: macOS 26.5
CPU: (10) arm64 Apple M4
Memory: 157.97 MB / 16.00 GB
Binaries:
Node: 24.13.0 - /Users/manas/.local/share/mise/installs/node/24.13.0/bin/node
Yarn: 1.22.22 - /Users/manas/.local/share/mise/installs/node/24.13.0/bin/yarn
npm: 11.6.2 - /Users/manas/.local/share/mise/installs/node/24.13.0/bin/npm
npmPackages:
@playwright/test: ^1.62.1 => 1.62.1
Version
1.62.1
Steps to reproduce
page.screencast.start()'s type definition still lists anannotateoption, but that option was removed from the implementation in #39852 (shipped in v1.59.0). The type change was missed, soannotateis accepted by TypeScript while being silently ignored at runtime.Minimal reproduction:
Run it, then open
video.webm:showActionslabels appear in the top-right.annotate: { position: 'top-left' }produces nothing in the top-left, andstart()throws no error.Expected behavior
The public types should match the implementation. Since
annotatewas intentionally removed fromScreencast.start()(#39852), it should also be removed frompackages/playwright-core/types/types.d.tsso TypeScript no longer offers/accepts a non-functional option. (Alternatively, ifannotateonstart()was meant to stay, restore the runtime support.)Actual behavior
Screencast.start()still declaresannotateintypes.d.ts, so it type-checks and autocompletes, but it is never read by the client, never sent over the protocol, and has no effect on the recording. No error is raised, the option is silently dropped.The removal PR #39852 cleaned
annotateout of every layer except the generated types.packages/playwright-core/types/types.d.tswas not part of that commit, so the option lingers there. On currentmain,start()intypes.d.tsstill hasannotate, whileclient/screencast.tsstart()does not read it.Ref: https://github.com/microsoft/playwright/blob/main/packages/playwright-core/types/types.d.ts#L18764-L18768
Additional context
Environment
System: OS: macOS 26.5 CPU: (10) arm64 Apple M4 Memory: 157.97 MB / 16.00 GB Binaries: Node: 24.13.0 - /Users/manas/.local/share/mise/installs/node/24.13.0/bin/node Yarn: 1.22.22 - /Users/manas/.local/share/mise/installs/node/24.13.0/bin/yarn npm: 11.6.2 - /Users/manas/.local/share/mise/installs/node/24.13.0/bin/npm npmPackages: @playwright/test: ^1.62.1 => 1.62.1