Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: call findChromiumChannel only for Chromium based browsers (#35580)
Yury Semikhatskyb10f920a152f
diff --git a/packages/playwright-core/src/server/launchApp.ts b/packages/playwright-core/src/server/launchApp.tsindex 84b4c6d6d2..7da367af09 100644--- a/packages/playwright-core/src/server/launchApp.ts+++ b/packages/playwright-core/src/server/launchApp.ts@@ -36,6 +36,7 @@ export async function launchApp(browserType: BrowserType, options: {}) {const args = [...options.persistentContextOptions?.args ?? []];+ let channel = options.persistentContextOptions?.channel;if (browserType.name() === 'chromium') {args.push('--app=data:text/html,',@@ -43,12 +44,14 @@ export async function launchApp(browserType: BrowserType, options: {...(options.windowPosition ? [`--window-position=${options.windowPosition.x},${options.windowPosition.y}`] : []),'--test-type=',);+ if (!channel && !options.persistentContextOptions?.executablePath)+ channel = findChromiumChannel(options.sdkLanguage);}const context = await browserType.launchPersistentContext(serverSideCallMetadata(), '', {ignoreDefaultArgs: ['--enable-automation'],...options?.persistentContextOptions,- channel: options.persistentContextOptions?.channel ?? (!options.persistentContextOptions?.executablePath ? findChromiumChannel(options.sdkLanguage) : undefined),+ channel,noDefaultViewport: options.persistentContextOptions?.noDefaultViewport ?? true,acceptDownloads: options?.persistentContextOptions?.acceptDownloads ?? (isUnderTest() ? 'accept' : 'internal-browser-default'),colorScheme: options?.persistentContextOptions?.colorScheme ?? 'no-override',