Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/html-reporter/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function formatUrl(url: string | undefined): string | undefined {
const parsed = new URL(url, window.location.href);
if (parsed.origin === window.location.origin) {
for (const [key, value] of new URLSearchParams(window.location.search))
parsed.searchParams.append(key, value);
parsed.searchParams.set(key, value);
return parsed.toString();
}
return url;
Expand Down
9 changes: 3 additions & 6 deletions packages/playwright-core/src/cli/daemon/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import path from 'path';

import { startCliDaemonServer } from './daemon';
import { setupExitWatchdog } from '../../mcp/watchdog';
import { contextFactory } from '../../mcp/browserContextFactory';
import { ExtensionContextFactory } from '../../mcp/extensionContextFactory';
import { createBrowser } from '../../mcp/browserFactory';
import * as configUtils from '../../mcp/config';
import { ClientInfo, createClientInfo } from '../client/registry';

Expand All @@ -47,10 +46,8 @@ export function decorateCLICommand(command: Command, version: string) {
const mcpClientInfo = { cwd: process.cwd() };

try {
const extensionContextFactory = new ExtensionContextFactory(mcpConfig.browser.launchOptions.channel || 'chrome', mcpConfig.browser.userDataDir, mcpConfig.browser.launchOptions.executablePath);
const browserContextFactory = contextFactory(mcpConfig);
const cf = mcpConfig.extension ? extensionContextFactory : browserContextFactory;
const browserContext = mcpConfig.browser.isolated ? await cf.createContext(mcpClientInfo) : (await cf.contexts(mcpClientInfo))[0];
const browser = await createBrowser(mcpConfig, mcpClientInfo);
const browserContext = mcpConfig.browser.isolated ? await browser.newContext(mcpConfig.browser.contextOptions) : browser.contexts()[0];
const socketPath = await startCliDaemonServer(sessionName, browserContext, mcpConfig, clientInfo, { ...options, exitOnClose: true });
console.log(`### Success\nDaemon listening on ${socketPath}`);
console.log('<EOF>');
Expand Down
313 changes: 0 additions & 313 deletions packages/playwright-core/src/mcp/browserContextFactory.ts

This file was deleted.

Loading
Loading