Skip to content

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

test(bidi): set channel option in showTraceViewer() fixture (#39222)

Holger Benl8946b03f6f7c
diff --git a/tests/config/traceViewerFixtures.ts b/tests/config/traceViewerFixtures.ts
index bb106fe6aa..0668ae3dcb 100644
--- a/tests/config/traceViewerFixtures.ts
+++ b/tests/config/traceViewerFixtures.ts
@@ -153,7 +153,7 @@ class TraceViewerPage {
}
export const traceViewerFixtures: Fixtures<TraceViewerFixtures, {}, BaseTestFixtures, BaseWorkerFixtures> = {
- showTraceViewer: async ({ playwright, childProcess }, use) => {
+ showTraceViewer: async ({ playwright, childProcess, browserName }, use) => {
const browsers: Browser[] = [];
await use(async (trace: string | undefined, { host, port, stdin } = {}) => {
const command = [
@@ -171,6 +171,7 @@ export const traceViewerFixtures: Fixtures<TraceViewerFixtures, {}, BaseTestFixt
const cp = childProcess({ command });
await cp.waitForOutput('Listening on');
const browser = await playwright.chromium.launch({
+ ...(browserName === 'chromium' ? {} : { channel: 'chromium' }),
executablePath: process.env.CRPATH, // without this, setting FFPATH makes us launch Firefox with Chromium args
});
browsers.push(browser);