docs: fix python snippet

This commit is contained in:
Pavel Feldman 2022-02-08 08:02:06 -08:00
parent 8a5c93436d
commit 3a898c285e

View File

@ -3634,13 +3634,13 @@ Response response = page.waitForResponse(response -> "https://example.com".equal
```python async
async with page.expect_response("https://example.com/resource") as response_info:
await page.click("input")
response = response_info.value
response = await response_info.value
return response.ok
# or with a lambda
async with page.expect_response(lambda response: response.url == "https://example.com" and response.status == 200) as response_info:
await page.click("input")
response = response_info.value
response = await response_info.value
return response.ok
```