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/playwright-core/src/tools/cli-client/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class TextOutput implements Output {
attach(session: string, pid: number | undefined, endpoint: string | undefined, toolResult: string): void {
if (endpoint) {
console.log(`### Session \`${session}\` created, attached to \`${endpoint}\`.`);
console.log(`Run commands with: playwright-cli --s=${session} <command>`);
console.log(`Run commands with: playwright-cli -s=${session} <command>`);
console.log('');
} else {
console.log(`### Browser \`${session}\` opened with pid ${pid}.`);
Expand Down
4 changes: 2 additions & 2 deletions tests/mcp/cli-session.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ workspace1:
await page.setContent('<title>My Page</title>');
const { output: openOutput } = await cli('attach', 'foobar');
expect(openOutput).toContain('### Session `foobar` created, attached to `foobar`.');
expect(openOutput).toContain('Run commands with: playwright-cli --s=foobar <command>');
expect(openOutput).toContain('Run commands with: playwright-cli -s=foobar <command>');
const { output: listOutput } = await cli('list', '--all');
expect(listOutput).toBe(`### Browsers
/:
Expand Down Expand Up @@ -326,7 +326,7 @@ workspace1:
await page.setContent('<title>Alias Page</title>');
const { output: openOutput } = await cli('attach', 'foobar', '--session=mybrowser');
expect(openOutput).toContain('### Session `mybrowser` created, attached to `foobar`.');
expect(openOutput).toContain('Run commands with: playwright-cli --s=mybrowser <command>');
expect(openOutput).toContain('Run commands with: playwright-cli -s=mybrowser <command>');
await cli('-s', 'mybrowser', 'close');
});

Expand Down
Loading