diff --git a/tests/library/inspector/cli-codegen-1.spec.ts b/tests/library/inspector/cli-codegen-1.spec.ts
index 9056a890a1..00fe3d6802 100644
--- a/tests/library/inspector/cli-codegen-1.spec.ts
+++ b/tests/library/inspector/cli-codegen-1.spec.ts
@@ -19,6 +19,7 @@ import type { ConsoleMessage } from 'playwright';
test.describe('cli codegen', () => {
test.skip(({ mode }) => mode !== 'default');
+ test.skip(({ trace, codegenMode }) => trace === 'on' && codegenMode === 'trace-events');
test('should click', async ({ openRecorder }) => {
const { page, recorder } = await openRecorder();
diff --git a/tests/library/inspector/cli-codegen-2.spec.ts b/tests/library/inspector/cli-codegen-2.spec.ts
index 21182353a6..11355008e1 100644
--- a/tests/library/inspector/cli-codegen-2.spec.ts
+++ b/tests/library/inspector/cli-codegen-2.spec.ts
@@ -20,6 +20,7 @@ import fs from 'fs';
test.describe('cli codegen', () => {
test.skip(({ mode }) => mode !== 'default');
+ test.skip(({ trace, codegenMode }) => trace === 'on' && codegenMode === 'trace-events');
test('should contain open page', async ({ openRecorder }) => {
const { recorder } = await openRecorder();
@@ -549,18 +550,17 @@ await page.Locator("#textarea").FillAsync(\"Hello'\\"\`\\nWorld\");`);
expect(message.text()).toBe('Hello\'\"\`\nWorld');
});
-});
-
-test('should --test-id-attribute', async ({ openRecorder }) => {
- const { page, recorder } = await openRecorder({ testIdAttributeName: 'my-test-id' });
-
- await recorder.setContentAndWait(`
Hello
`);
- await page.click('[my-test-id=foo]');
- const sources = await recorder.waitForOutput('JavaScript', `page.getByTestId`);
-
- expect.soft(sources.get('JavaScript')!.text).toContain(`await page.getByTestId('foo').click()`);
- expect.soft(sources.get('Java')!.text).toContain(`page.getByTestId("foo").click()`);
- expect.soft(sources.get('Python')!.text).toContain(`page.get_by_test_id("foo").click()`);
- expect.soft(sources.get('Python Async')!.text).toContain(`await page.get_by_test_id("foo").click()`);
- expect.soft(sources.get('C#')!.text).toContain(`await page.GetByTestId("foo").ClickAsync();`);
+ test('should --test-id-attribute', async ({ openRecorder }) => {
+ const { page, recorder } = await openRecorder({ testIdAttributeName: 'my-test-id' });
+
+ await recorder.setContentAndWait(`Hello
`);
+ await page.click('[my-test-id=foo]');
+ const sources = await recorder.waitForOutput('JavaScript', `page.getByTestId`);
+
+ expect.soft(sources.get('JavaScript')!.text).toContain(`await page.getByTestId('foo').click()`);
+ expect.soft(sources.get('Java')!.text).toContain(`page.getByTestId("foo").click()`);
+ expect.soft(sources.get('Python')!.text).toContain(`page.get_by_test_id("foo").click()`);
+ expect.soft(sources.get('Python Async')!.text).toContain(`await page.get_by_test_id("foo").click()`);
+ expect.soft(sources.get('C#')!.text).toContain(`await page.GetByTestId("foo").ClickAsync();`);
+ });
});
diff --git a/tests/library/inspector/cli-codegen-3.spec.ts b/tests/library/inspector/cli-codegen-3.spec.ts
index 7df682512b..47495a9909 100644
--- a/tests/library/inspector/cli-codegen-3.spec.ts
+++ b/tests/library/inspector/cli-codegen-3.spec.ts
@@ -18,6 +18,7 @@ import { test, expect } from './inspectorTest';
test.describe('cli codegen', () => {
test.skip(({ mode }) => mode !== 'default');
+ test.skip(({ trace, codegenMode }) => trace === 'on' && codegenMode === 'trace-events');
test('should click locator.first', async ({ openRecorder }) => {
const { page, recorder } = await openRecorder();