use of the correct type

This commit is contained in:
Kevin Jagodic 2024-09-02 10:54:46 +02:00 committed by GitHub
parent 5c2e9962b4
commit 62b764405f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -288,7 +288,7 @@ await Expect(page.GetByText("Strawberry")).ToBeVisibleAsync();
```java ```java
// Get the response from the HAR file // Get the response from the HAR file
page.routeFromHAR("./hars/fruit.har", new RouteFromHAROptions() page.routeFromHAR(Path.of("./hars/fruit.har"), new RouteFromHAROptions()
.setUrl("*/**/api/v1/fruits") .setUrl("*/**/api/v1/fruits")
.setUpdate(true) .setUpdate(true)
); );
@ -386,7 +386,7 @@ await page.ExpectByTextAsync("Playwright", new() { Exact = true }).ToBeVisibleAs
// Replay API requests from HAR. // Replay API requests from HAR.
// Either use a matching response from the HAR, // Either use a matching response from the HAR,
// or abort the request if nothing matches. // or abort the request if nothing matches.
page.routeFromHAR("./hars/fruit.har", new RouteFromHAROptions() page.routeFromHAR(Path.of("./hars/fruit.har"), new RouteFromHAROptions()
.setUrl("*/**/api/v1/fruits") .setUrl("*/**/api/v1/fruits")
.setUpdate(false) .setUpdate(false)
); );