diff --git a/docs/src/browsers.md b/docs/src/browsers.md index 1b12ff534c..fc3dfb38a1 100644 --- a/docs/src/browsers.md +++ b/docs/src/browsers.md @@ -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