cherry-pick(#15162): docs: fix routing and har examples
This commit is contained in:
parent
7db695ffb5
commit
25cd4c9a30
|
|
@ -740,7 +740,7 @@ await context.close();
|
||||||
```java
|
```java
|
||||||
BrowserContext context = browser.newContext(new Browser.NewContextOptions()
|
BrowserContext context = browser.newContext(new Browser.NewContextOptions()
|
||||||
.setRecordHarPath(Paths.get("example.har"))
|
.setRecordHarPath(Paths.get("example.har"))
|
||||||
.setRecordHarUrlFilter("**/api/**");
|
.setRecordHarUrlFilter("**/api/**"));
|
||||||
|
|
||||||
// ... Perform actions ...
|
// ... Perform actions ...
|
||||||
|
|
||||||
|
|
@ -798,13 +798,13 @@ page.routeFromHAR(Paths.get("example.har"));
|
||||||
```python async
|
```python async
|
||||||
# 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.
|
||||||
await page.routeFromHAR("example.har")
|
await page.route_from_har("example.har")
|
||||||
```
|
```
|
||||||
|
|
||||||
```python sync
|
```python sync
|
||||||
# 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("example.har")
|
page.route_from_har("example.har")
|
||||||
```
|
```
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue