Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

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

Tim Rogowski3030d97b2b80
diff --git a/docs/src/evaluating.md b/docs/src/evaluating.md
index ceb61e1d9b..3c31ff09b2 100644
--- a/docs/src/evaluating.md
+++ b/docs/src/evaluating.md
@@ -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);
}");
```