docs: expose tracing API in java (#6387)

This commit is contained in:
Yury Semikhatsky 2021-05-03 22:23:03 +00:00 committed by GitHub
parent 6219042c74
commit fe94dc5cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
@ -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")
@ -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