docs(python): fix missing await in JS evaluation example (#14426)

This commit is contained in:
Tim Rogowski 2022-05-27 12:21:13 +02:00 committed by GitHub
parent bb2d7cb9ad
commit 3030d97b2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ status = await page.evaluate("""async () => {
```python sync
status = page.evaluate("""async () => {
response = fetch(location.href)
response = await fetch(location.href)
return response.status
}""")
```
@ -367,6 +367,6 @@ var data = new { text = "some data", value = 1};
// Pass data as a parameter
var result = await page.EvaluateAsync(@"data => {
// There is no |data| in the web page.
window.myApp.use(data);
window.myApp.use(data);
}");
```