mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
docs: expose tracing API in java (#6387)
This commit is contained in:
parent
6219042c74
commit
fe94dc5cf3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user