mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: clarify tracing name parameter semantics (#28759)
Fixes https://github.com/microsoft/playwright/issues/28751
This commit is contained in:
parent
5d9e08ac61
commit
207585ef63
@ -86,14 +86,14 @@ context.tracing().stop(new Tracing.StopOptions()
|
|||||||
```
|
```
|
||||||
|
|
||||||
```python async
|
```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()
|
page = await context.new_page()
|
||||||
await page.goto("https://playwright.dev")
|
await page.goto("https://playwright.dev")
|
||||||
await context.tracing.stop(path = "trace.zip")
|
await context.tracing.stop(path = "trace.zip")
|
||||||
```
|
```
|
||||||
|
|
||||||
```python sync
|
```python sync
|
||||||
context.tracing.start(name="trace", screenshots=True, snapshots=True)
|
context.tracing.start(screenshots=True, snapshots=True)
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
page.goto("https://playwright.dev")
|
page.goto("https://playwright.dev")
|
||||||
context.tracing.stop(path = "trace.zip")
|
context.tracing.stop(path = "trace.zip")
|
||||||
@ -120,8 +120,10 @@ await context.Tracing.StopAsync(new()
|
|||||||
* since: v1.12
|
* since: v1.12
|
||||||
- `name` <[string]>
|
- `name` <[string]>
|
||||||
|
|
||||||
If specified, the trace is going to be saved into the file with the
|
If specified, intermediate trace files are going to be saved into the files with the
|
||||||
given name inside the [`option: tracesDir`] folder specified in [`method: BrowserType.launch`].
|
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
|
### option: Tracing.start.screenshots
|
||||||
* since: v1.12
|
* since: v1.12
|
||||||
@ -204,7 +206,7 @@ context.tracing().stopChunk(new Tracing.StopChunkOptions()
|
|||||||
```
|
```
|
||||||
|
|
||||||
```python async
|
```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()
|
page = await context.new_page()
|
||||||
await page.goto("https://playwright.dev")
|
await page.goto("https://playwright.dev")
|
||||||
|
|
||||||
@ -220,7 +222,7 @@ await context.tracing.stop_chunk(path = "trace2.zip")
|
|||||||
```
|
```
|
||||||
|
|
||||||
```python sync
|
```python sync
|
||||||
context.tracing.start(name="trace", screenshots=True, snapshots=True)
|
context.tracing.start(screenshots=True, snapshots=True)
|
||||||
page = context.new_page()
|
page = context.new_page()
|
||||||
page.goto("https://playwright.dev")
|
page.goto("https://playwright.dev")
|
||||||
|
|
||||||
@ -274,8 +276,10 @@ Trace name to be shown in the Trace Viewer.
|
|||||||
* since: v1.32
|
* since: v1.32
|
||||||
- `name` <[string]>
|
- `name` <[string]>
|
||||||
|
|
||||||
If specified, the trace is going to be saved into the file with the
|
If specified, intermediate trace files are going to be saved into the files with the
|
||||||
given name inside the [`option: tracesDir`] folder specified in [`method: BrowserType.launch`].
|
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
|
## async method: Tracing.stop
|
||||||
* since: v1.12
|
* since: v1.12
|
||||||
|
16
packages/playwright-core/types/types.d.ts
vendored
16
packages/playwright-core/types/types.d.ts
vendored
@ -19211,9 +19211,11 @@ export interface Tracing {
|
|||||||
*/
|
*/
|
||||||
start(options?: {
|
start(options?: {
|
||||||
/**
|
/**
|
||||||
* If specified, the trace is going to be saved into the file with the given name inside the `tracesDir` folder
|
* If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
|
||||||
* specified in
|
* `tracesDir` folder specified in
|
||||||
* [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch).
|
* [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;
|
name?: string;
|
||||||
|
|
||||||
@ -19269,9 +19271,11 @@ export interface Tracing {
|
|||||||
*/
|
*/
|
||||||
startChunk(options?: {
|
startChunk(options?: {
|
||||||
/**
|
/**
|
||||||
* If specified, the trace is going to be saved into the file with the given name inside the `tracesDir` folder
|
* If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
|
||||||
* specified in
|
* `tracesDir` folder specified in
|
||||||
* [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch).
|
* [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;
|
name?: string;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user