docs(dotnet): fix .NET code example (#9415)

Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Dmitry Anshilevich 2021-10-12 00:29:48 +03:00 committed by GitHub
parent 876e08315b
commit 8ae926efbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -163,7 +163,7 @@ class PlaywrightExample
{ {
using var playwright = await Playwright.CreateAsync(); using var playwright = await Playwright.CreateAsync();
await using var browser = await playwright.Webkit.LaunchAsync(); await using var browser = await playwright.Webkit.LaunchAsync();
await using var context = await browser.NewContextAsync(Playwright.Devices["iPhone 6"]); await using var context = await browser.NewContextAsync(playwright.Devices["iPhone 6"]);
var page = await context.NewPageAsync(); var page = await context.NewPageAsync();
await page.GotoAsync("https://www.theverge.com"); await page.GotoAsync("https://www.theverge.com");

View file

@ -214,7 +214,7 @@ class PlaywrightExample
{ {
using var playwright = await Playwright.CreateAsync(); using var playwright = await Playwright.CreateAsync();
await using var browser = await playwright.Webkit.LaunchAsync(); await using var browser = await playwright.Webkit.LaunchAsync();
var options = new BrowserContextNewOptions(Playwright.Devices["iPhone 11 Pro"]) var options = new BrowserNewContextOptions(playwright.Devices["iPhone 11 Pro"])
{ {
Geolocation = new() { Longitude = 12.492507f, Latitude = 41.889938f }, Geolocation = new() { Longitude = 12.492507f, Latitude = 41.889938f },
Permissions = new[] { "geolocation" }, Permissions = new[] { "geolocation" },