docs: brush up some python docs (#5027)

This commit is contained in:
Pavel Feldman 2021-01-15 09:12:47 -08:00 committed by GitHub
parent b45905ae3f
commit 56ba0b3cd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -227,7 +227,7 @@ async def main():
browser = await p.chromium.launch_persistent_context(userDataDir, headless=False) browser = await p.chromium.launch_persistent_context(userDataDir, headless=False)
# Execute login steps manually in the browser window # Execute login steps manually in the browser window
asyncio.get_event_loop().run_until_complete(main()) asyncio.run(main())
``` ```
```python sync ```python sync

View file

@ -296,7 +296,7 @@ async def main():
# Works across chromium, firefox and webkit # Works across chromium, firefox and webkit
browser = await p.chromium.launch(headless=False) browser = await p.chromium.launch(headless=False)
asyncio.get_event_loop().run_until_complete(main()) asyncio.run(main())
``` ```
```python sync ```python sync

View file

@ -17,8 +17,8 @@ $ npx playwright --help
$ python -m playwright $ python -m playwright
``` ```
Running from `package.json` script ```json js
```json # Running from `package.json` script
{ {
"scripts": { "scripts": {
"help": "playwright --help" "help": "playwright --help"

View file

@ -38,7 +38,7 @@ async def main():
browser = await p.chromium.launch(headless=False) browser = await p.chromium.launch(headless=False)
await browser.close() await browser.close()
asyncio.get_event_loop().run_until_complete(main()) asyncio.run(main())
``` ```
```python sync ```python sync
@ -113,7 +113,7 @@ async def main():
page = await browser.newPage() page = await browser.newPage()
await browser.close() await browser.close()
asyncio.get_event_loop().run_until_complete(main()) asyncio.run(main())
``` ```
```python sync ```python sync