Skip to content

Commit

Permalink
docs: expose tracing API in java (#6387)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored May 3, 2021
1 parent 6219042 commit fe94dc5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions docs/src/api/class-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ testing frameworks should explicitly create [`method: Browser.newContext`] follo
### option: Browser.newPage.storageStatePath = %%-csharp-java-context-option-storage-state-path-%%

## async method: Browser.startTracing
* langs: js, python
* langs: java, js, python

:::note
Tracing is only supported on Chromium-based browsers.
Expand All @@ -215,6 +215,13 @@ await page.goto('https://www.google.com');
await browser.stopTracing();
```

```java
browser.startTracing(page, new Browser.StartTracingOptions()
.setPath(Paths.get("trace.json")));
page.goto('https://www.google.com');
browser.stopTracing();
```

```python async
await browser.start_tracing(page, path="trace.json")
await page.goto("https://www.google.com")
Expand Down Expand Up @@ -248,7 +255,7 @@ captures screenshots in the trace.
specify custom categories to use instead of default.

## async method: Browser.stopTracing
* langs: js, python
* langs: java, js, python
- returns: <[Buffer]>

:::note
Expand Down

0 comments on commit fe94dc5

Please sign in to comment.