chore: support channel and executable path params (#90)

Fixes https://github.com/microsoft/playwright-mcp/issues/89
This commit is contained in:
Pavel Feldman
2025-03-31 15:30:08 -07:00
committed by GitHub
parent d316441142
commit 9042c03faa
6 changed files with 69 additions and 2 deletions

View File

@@ -40,10 +40,13 @@ program
.option('--vision', 'Run server that uses screenshots (Aria snapshots are used by default)')
.option('--port <port>', 'Port to listen on for SSE transport.')
.option('--cdp-endpoint <endpoint>', 'CDP endpoint to connect to.')
.option('--channel <channel>', 'Channel to use for browser, possible values: chrome, msedge, chromium. Default: chrome')
.option('--executable-path <path>', 'Path to the browser executable.')
.action(async options => {
const launchOptions: LaunchOptions = {
headless: !!options.headless,
channel: 'chrome',
channel: options.channel ?? 'chrome',
executablePath: options.executablePath,
};
const userDataDir = options.userDataDir ?? await createUserDataDir();
const serverList = new ServerList(() => createServer({