Skip to content

Commit

Permalink
docs: add firefox-stable channel documentation (#6328)
Browse files Browse the repository at this point in the history
Fixes #5993
  • Loading branch information
aslushnikov authored May 3, 2021
1 parent fe94dc5 commit 653d483
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/src/api/class-browsertype.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Whether to run browser in headless mode. More details for
[`option: devtools`] option is `true`.

### option: BrowserType.launch.channel
- `channel` <[BrowserChannel]<"chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary">>
- `channel` <[BrowserChannel]<"chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary"|"firefox-stable">>

Browser distribution channel. Read more about using [Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).

Expand Down Expand Up @@ -327,7 +327,7 @@ Whether to run browser in headless mode. More details for
[`option: devtools`] option is `true`.

### option: BrowserType.launchPersistentContext.channel
- `channel` <[BrowserChannel]<"chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary">>
- `channel` <[BrowserChannel]<"chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary"|"firefox-stable">>

Browser distribution channel. Read more about using [Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).

Expand Down Expand Up @@ -434,7 +434,7 @@ Whether to run browser in headless mode. More details for
Port to use for the web socket. Defaults to 0 that picks any available port.

### option: BrowserType.launchServer.channel
- `channel` <[BrowserChannel]<"chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary">>
- `channel` <[BrowserChannel]<"chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary"|"firefox-stable">>

Browser distribution channel. Read more about using [Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).

Expand Down
50 changes: 49 additions & 1 deletion docs/src/browsers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,55 @@ on when to opt into stable channels, refer to the [Google Chrome & Microsoft Edg
## Firefox

Playwright's Firefox version matches the recent [Firefox Beta](https://www.mozilla.org/en-US/firefox/channel/desktop/)
build.
build.

### Firefox-Stable

Playwright team maintains a Playwright Firefox version that matches the latest Firefox Stable, a.k.a. `firefox-stable`.

Using `firefox-stable` is a 2-steps process:

1. Installing `firefox-stable` with Playwright CLI.
```sh js
$ npx playwright install firefox-stable
```

```sh java
$ mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="install firefox-stable"
```

```sh python
$ playwright install firefox-stable
```

2. Using `firefox-stable` channel when launching browser.
```js
const { firefox } = require('playwright');
const browser = await firefox.launch({
channel: 'firefox-stable'
});
```
```java
import com.microsoft.playwright.*;
public class Example {
public static void main(String[] args) {
try (Playwright playwright = Playwright.create()) {
BrowserType firefox = playwright.firefox();
Browser browser = firefox.launch(new BrowserType.LaunchOptions().setChannel("firefox-stable"));
}
}
}
```
```python async
browser = await playwright.firefox.launch(channel="firefox-stable")
```
```python sync
browser = playwright.firefox.launch(channel="firefox-stable")
```
## WebKit
Expand Down
6 changes: 3 additions & 3 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6768,7 +6768,7 @@ export interface BrowserType<Unused = {}> {
* Browser distribution channel. Read more about using
* [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
*/
channel?: "chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary";
channel?: "chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary"|"firefox-stable";

/**
* Enable Chromium sandboxing. Defaults to `true`.
Expand Down Expand Up @@ -7098,7 +7098,7 @@ export interface BrowserType<Unused = {}> {
* Browser distribution channel. Read more about using
* [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
*/
channel?: "chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary";
channel?: "chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary"|"firefox-stable";

/**
* Enable Chromium sandboxing. Defaults to `true`.
Expand Down Expand Up @@ -10799,7 +10799,7 @@ export interface LaunchOptions {
* Browser distribution channel. Read more about using
* [Google Chrome and Microsoft Edge](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge).
*/
channel?: "chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary";
channel?: "chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary"|"firefox-stable";

/**
* Enable Chromium sandboxing. Defaults to `false`.
Expand Down

0 comments on commit 653d483

Please sign in to comment.