docs(browsers): add note for Python about channels in launch() (#33396)
This commit is contained in:
parent
c95feccce4
commit
33593c5f06
|
@ -401,6 +401,23 @@ pytest test_login.py --browser-channel msedge
|
|||
dotnet test -- Playwright.BrowserName=chromium Playwright.LaunchOptions.Channel=msedge
|
||||
```
|
||||
|
||||
######
|
||||
* langs: python
|
||||
|
||||
Alternatively when using the library directly, you can specify the browser [`option: BrowserType.launch.channel`] when launching the browser:
|
||||
|
||||
```python
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
with sync_playwright() as p:
|
||||
# Channel can be "chrome", "msedge", "chrome-beta", "msedge-beta" or "msedge-dev".
|
||||
browser = p.chromium.launch(channel="msedge")
|
||||
page = browser.new_page()
|
||||
page.goto("http://playwright.dev")
|
||||
print(page.title())
|
||||
browser.close()
|
||||
```
|
||||
|
||||
#### Installing Google Chrome & Microsoft Edge
|
||||
|
||||
If Google Chrome or Microsoft Edge is not available on your machine, you can install
|
||||
|
|
Loading…
Reference in New Issue