Copilot generates Page Object structure, test data arrays, TypeScript interfaces, and Playwright assertion patterns as you type, all tasks where the pattern is predictable and output is easy to review. It cannot see your application, so selectors are always guesses and usually wrong. It also produces tests that click through flows without asserting anything, which pass by default and test nothing.

What Copilot Is

Copilot is a code completion tool that sees your current file (and optionally open tabs) and suggests what to write next. It's trained on public code from GitHub, so it has seen a lot of Playwright tests, testing patterns, and common QA code.

It works inside your editor — no browser tab, no copy-paste. As you type, it suggests completions you can accept with Tab.

You can also use Copilot Chat (the chat sidebar) to ask questions, explain code, or ask it to write something specific.

Where Copilot Is Genuinely Useful for QA

1. Boilerplate elimination

The most consistent win: Copilot is excellent at repetitive structure. If you're writing parameterized test cases:

const CASES = [
  { input: 'valid@email.com', expected: true },
  // start typing here...

Copilot will often suggest the next 5–10 rows of your test data table. Not always perfectly, but often good enough that you just Tab and edit.

Similarly for test setup:

test.beforeEach(async ({ page }) => {
  await page.goto('/');
  // Copilot suggests: await page.waitForLoadState('networkidle');

2. Page Object boilerplate

If you're creating a Page Object Model class, Copilot is very good at the structure:

export class LoginPage {
  constructor(private page: Page) {}
  
  // Type "async login(" and Copilot completes:
  async login(email: string, password: string) {
    await this.page.fill('[data-testid="email"]', email);
    await this.page.fill('[data-testid="password"]', password);
    await this.page.click('[data-testid="submit"]');
  }

The selector names will often be wrong (it guesses), but the structure and the await page.fill/click/expect patterns will be right.

3. TypeScript types and interfaces

Copilot handles TypeScript boilerplate well. If your test data is typed:

interface User {
  id: number;
  email: string;
  role: 'admin' | 'member' | 'viewer';
  // Copilot often continues: createdAt: string;

It knows common field names and TypeScript patterns.

4. Playwright assertion completion

If you type expect(page.locator(, Copilot knows the common assertions and will suggest:

await expect(page.locator('[data-testid="error"]')).toBeVisible();
await expect(page.locator('[data-testid="title"]')).toHaveText('Welcome');
await expect(page.locator('[data-testid="count"]')).toContainText('3 items');

Not revolutionary, but it's faster than remembering the exact assertion API every time.

5. Writing test helpers and utilities

If you write a comment like:

// Generate a random email for test data

Copilot often produces:

function generateTestEmail(): string {
  const timestamp = Date.now();
  return `test_${timestamp}@example.com`;
}

Useful for quick utilities you'd otherwise look up on Stack Overflow.

6. Copilot Chat: explaining unfamiliar code

When you inherit an automation codebase:

"Explain what this beforeAll hook does and why it uses storageState."

Copilot Chat is good at explaining code, suggesting why something was done a certain way, and giving you context on unfamiliar APIs.

Where Copilot Disappoints

Selectors are almost always wrong

Copilot cannot see your actual application. It guesses selectors based on common patterns ([data-testid="submit"], button.login-btn, #username). These are almost never your actual selectors. You'll always need to replace them.

Don't let Copilot write selectors — it'll slow you down with false suggestions you have to fix.

Test coverage decisions are yours

Copilot can write a test for the happy path. It won't tell you about the edge case where a user applies a discount code to a cart that has a product from a restricted category. It doesn't know your product.

Copilot is a code accelerator, not a test design tool. The decisions about what to test are always yours.

Generated tests often lack assertions

Copilot sometimes writes tests that click through a flow without asserting anything:

test('user checkout', async ({ page }) => {
  await page.goto('/checkout');
  await page.fill('#card', '4242 4242 4242 4242');
  await page.click('#submit');
  // No assertion — is this a test or just a script?
});

Always review generated code for missing expect() calls.

Multi-file context is limited

Copilot works best in the current file. If your fixtures are in a separate file, Copilot may not know about them. You'll sometimes need to tell it explicitly:

"Use the loginFixture imported from ../fixtures/auth."

Practical Workflow: How to Actually Use Copilot in Playwright

Do use Copilot for:
  • Writing the skeleton of a new test file
  • Generating repetitive test data arrays
  • Completing known Playwright API patterns
  • Writing TypeScript interfaces for test data
  • Writing utility functions (random data generators, helpers)
  • Understanding unfamiliar code via Copilot Chat
Don't rely on Copilot for:
  • Selectors (always write these yourself from DevTools/Playwright Inspector)
  • Test coverage decisions (your domain knowledge, not AI's)
  • Full test generation without review (verify assertions, logic, edge cases)
Prompt tip for Copilot Chat:

When asking Copilot Chat to write a test, be specific:

"Write a Playwright TypeScript test for the login form at /en/login. Selectors: data-testid='email-input', data-testid='password-input', data-testid='submit-btn', data-testid='error-message'. Test: valid login with test@example.com/ValidPass1 redirects to /dashboard. Invalid password shows error message."

Specific context = much better output.

→ See also: Prompt Engineering for QA Engineers: Get Better Results from AI Tools | AI in QA 2026: What's Actually Useful and What's Hype | Using ChatGPT for Test Case Generation: A QA Engineer's Practical Guide | Playwright MCP Explained: Let AI Write Your Tests

Copilot vs. ChatGPT for QA

| | Copilot | ChatGPT |

|-|---------|---------|

| Best for | Inline code completion, quick suggestions | Longer code generation, explanations, test planning |

| Workflow | Stays in your editor | Separate browser tab |

| Context | Sees current file | Sees what you paste |

| Speed | Instant, as you type | Takes a few seconds |

| Test design | Not useful | More useful with good prompts |

In practice, many QA engineers use both: Copilot while writing code, ChatGPT for designing what to write.

Is Copilot Worth It?

At $10/month (or free with GitHub Education), yes — for QA automation engineers who write tests regularly. You'll get your money back in time saved on boilerplate alone, especially when creating new test files and POM classes.

If you only write tests occasionally, the productivity gain is smaller. Try the free tier first.

The key insight: Copilot doesn't make you a better QA engineer. It makes a good QA engineer faster. The judgment about what to test, how to structure tests, and what edge cases matter — that's still entirely you.