diff --git a/docs/src/api/class-tracing.md b/docs/src/api/class-tracing.md index c1d92ca34a..6e7541e4cb 100644 --- a/docs/src/api/class-tracing.md +++ b/docs/src/api/class-tracing.md @@ -86,14 +86,14 @@ context.tracing().stop(new Tracing.StopOptions() ``` ```python async -await context.tracing.start(name="trace", screenshots=True, snapshots=True) +await context.tracing.start(screenshots=True, snapshots=True) page = await context.new_page() await page.goto("https://playwright.dev") await context.tracing.stop(path = "trace.zip") ``` ```python sync -context.tracing.start(name="trace", screenshots=True, snapshots=True) +context.tracing.start(screenshots=True, snapshots=True) page = context.new_page() page.goto("https://playwright.dev") context.tracing.stop(path = "trace.zip") @@ -120,8 +120,10 @@ await context.Tracing.StopAsync(new() * since: v1.12 - `name` <[string]> -If specified, the trace is going to be saved into the file with the -given name inside the [`option: tracesDir`] folder specified in [`method: BrowserType.launch`]. +If specified, intermediate trace files are going to be saved into the files with the +given name prefix inside the [`option: tracesDir`] folder specified in [`method: BrowserType.launch`]. +To specify the final trace zip file name, you need to pass `path` option to +[`method: Tracing.stop`] instead. ### option: Tracing.start.screenshots * since: v1.12 @@ -204,7 +206,7 @@ context.tracing().stopChunk(new Tracing.StopChunkOptions() ``` ```python async -await context.tracing.start(name="trace", screenshots=True, snapshots=True) +await context.tracing.start(screenshots=True, snapshots=True) page = await context.new_page() await page.goto("https://playwright.dev") @@ -220,7 +222,7 @@ await context.tracing.stop_chunk(path = "trace2.zip") ``` ```python sync -context.tracing.start(name="trace", screenshots=True, snapshots=True) +context.tracing.start(screenshots=True, snapshots=True) page = context.new_page() page.goto("https://playwright.dev") @@ -274,8 +276,10 @@ Trace name to be shown in the Trace Viewer. * since: v1.32 - `name` <[string]> -If specified, the trace is going to be saved into the file with the -given name inside the [`option: tracesDir`] folder specified in [`method: BrowserType.launch`]. +If specified, intermediate trace files are going to be saved into the files with the +given name prefix inside the [`option: tracesDir`] folder specified in [`method: BrowserType.launch`]. +To specify the final trace zip file name, you need to pass `path` option to +[`method: Tracing.stopChunk`] instead. ## async method: Tracing.stop * since: v1.12 diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 39b1e60d67..8c1144a875 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -19211,9 +19211,11 @@ export interface Tracing { */ start(options?: { /** - * If specified, the trace is going to be saved into the file with the given name inside the `tracesDir` folder - * specified in - * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). + * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the + * `tracesDir` folder specified in + * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify + * the final trace zip file name, you need to pass `path` option to + * [tracing.stop([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop) instead. */ name?: string; @@ -19269,9 +19271,11 @@ export interface Tracing { */ startChunk(options?: { /** - * If specified, the trace is going to be saved into the file with the given name inside the `tracesDir` folder - * specified in - * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). + * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the + * `tracesDir` folder specified in + * [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify + * the final trace zip file name, you need to pass `path` option to + * [tracing.stopChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk) instead. */ name?: string;