docs(trace-viewer-intro): fix code snippet for C# (#22648)

This commit is contained in:
Adrien Clerbois 2023-04-26 22:20:45 +02:00 committed by GitHub
parent f3852d4511
commit b7656e605a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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