Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(types): add channel to launchServer (#6256)

Max Schmitt7053ac909766
diff --git a/docs/src/api/class-browsertype.md b/docs/src/api/class-browsertype.md
index c7794ca596..9ec4e25bc1 100644
--- a/docs/src/api/class-browsertype.md
+++ b/docs/src/api/class-browsertype.md
@@ -295,7 +295,7 @@ Whether to run browser in headless mode. More details for
### option: BrowserType.launchPersistentContext.channel
- `channel` <[BrowserChannel]<"chrome"|"chrome-beta"|"chrome-dev"|"chrome-canary"|"msedge"|"msedge-beta"|"msedge-dev"|"msedge-canary">>
-Browser distribution channel.
+Browser distribution channel. Read more about using [Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).
### option: BrowserType.launchPersistentContext.executablePath
- `executablePath` <[path]>
@@ -399,6 +399,11 @@ 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">>
+
+Browser distribution channel. Read more about using [Google Chrome and Microsoft Edge](./browsers.md#google-chrome--microsoft-edge).
+
### option: BrowserType.launchServer.executablePath
- `executablePath` <[path]>
diff --git a/src/client/types.ts b/src/client/types.ts
index b84ec772f4..f0276cb4c8 100644
--- a/src/client/types.ts
+++ b/src/client/types.ts
@@ -75,6 +75,7 @@ export type ConnectOptions = {
logger?: Logger,
};
export type LaunchServerOptions = {
+ channel?: channels.BrowserTypeLaunchOptions['channel'],
executablePath?: string,
args?: string[],
ignoreDefaultArgs?: boolean | string[],
diff --git a/types/types.d.ts b/types/types.d.ts
index faa2d1f104..ee5ab3e0c6 100644
--- a/types/types.d.ts
+++ b/types/types.d.ts
@@ -6711,7 +6711,8 @@ export interface BrowserType<Unused = {}> {
bypassCSP?: boolean;
/**
- * Browser distribution channel.
+ * 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";
@@ -7039,6 +7040,12 @@ export interface BrowserType<Unused = {}> {
*/
args?: Array<string>;
+ /**
+ * 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";
+
/**
* Enable Chromium sandboxing. Defaults to `true`.
*/