mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-04 16:37:49 +03:00
docs(python): fix missing await in JS evaluation example (#14426)
This commit is contained in:
parent
bb2d7cb9ad
commit
3030d97b2b
@ -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);
|
||||
}");
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user