Skip to content

Commit

Permalink
docs: brush up some python docs (#5027)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored Jan 15, 2021
1 parent b45905a commit 56ba0b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/src/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async def main():
browser = await p.chromium.launch_persistent_context(userDataDir, headless=False)
# Execute login steps manually in the browser window

asyncio.get_event_loop().run_until_complete(main())
asyncio.run(main())
```

```python sync
Expand Down
2 changes: 1 addition & 1 deletion docs/src/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async def main():
# Works across chromium, firefox and webkit
browser = await p.chromium.launch(headless=False)
asyncio.get_event_loop().run_until_complete(main())
asyncio.run(main())
```

```python sync
Expand Down
4 changes: 2 additions & 2 deletions docs/src/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ $ npx playwright --help
$ python -m playwright
```

Running from `package.json` script
```json
```json js
# Running from `package.json` script
{
"scripts": {
"help": "playwright --help"
Expand Down
4 changes: 2 additions & 2 deletions docs/src/core-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def main():
browser = await p.chromium.launch(headless=False)
await browser.close()

asyncio.get_event_loop().run_until_complete(main())
asyncio.run(main())
```

```python sync
Expand Down Expand Up @@ -113,7 +113,7 @@ async def main():
page = await browser.newPage()
await browser.close()

asyncio.get_event_loop().run_until_complete(main())
asyncio.run(main())
```

```python sync
Expand Down

0 comments on commit 56ba0b3

Please sign in to comment.