docs(trace-viewer-intro): fix code snippet for C# (#22648)
This commit is contained in:
parent
f3852d4511
commit
b7656e605a
|
|
@ -62,7 +62,7 @@ context.tracing.stop(path = "trace.zip")
|
||||||
```
|
```
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
await using var browser = playwright.Chromium.LaunchAsync();
|
await using var browser = await Playwright.Chromium.LaunchAsync();
|
||||||
await using var context = await browser.NewContextAsync();
|
await using var context = await browser.NewContextAsync();
|
||||||
|
|
||||||
// Start tracing before creating / navigating a page.
|
// Start tracing before creating / navigating a page.
|
||||||
|
|
@ -73,7 +73,7 @@ await context.Tracing.StartAsync(new()
|
||||||
Sources = true
|
Sources = true
|
||||||
});
|
});
|
||||||
|
|
||||||
var page = context.NewPageAsync();
|
var page = await context.NewPageAsync();
|
||||||
await page.GotoAsync("https://playwright.dev");
|
await page.GotoAsync("https://playwright.dev");
|
||||||
|
|
||||||
// Stop tracing and export it into a zip archive.
|
// Stop tracing and export it into a zip archive.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue