This Playwright roadmap sets out what to learn at each stage, from your first script to designing a framework for a large organisation, with projects and interview questions for every stage. It follows the Java track first (ideal if you're coming from Selenium, with a 30-day fast track), then shows what changes if you choose TypeScript.
Fast-Track: Selenium → Playwright in 30 Days
You already have a Java + Selenium foundation, so you do not start at zero. This is a focused 30-day plan to convert that experience into Playwright fluency. Skip nothing, but move quickly through what overlaps with Selenium.
| Days | Focus | Outcome |
|---|---|---|
| 1-3 | Setup, Playwright/Browser/Context/Page, first test | Running your first Playwright test |
| 4-8 | Locators (getByRole/testId), auto-wait, web-first assertions | Rewrite a Selenium test the Playwright way |
| 9-14 | Actions, dialogs, frames, tabs, uploads, screenshots, trace | Handle every common interaction |
| 15-20 | POM, PlaywrightFactory, storageState, data-driven | A small clean framework |
| 21-25 | Allure, cross-browser, parallel via contexts | Reporting + parallel suite |
| 26-30 | API testing, network mocking, CI (GitHub Actions), trace debugging | Portfolio-ready project |
- Stop adding waits. Auto-wait + web-first assertions replace WebDriverWait almost entirely.
- Stop reaching for XPath. Lead with getByRole/getByTestId.
- Think in contexts, not drivers. One browser, many cheap isolated contexts = parallelism.
- Debug with traces, not print statements. The trace viewer shows you exactly what happened.
STAGE 1: Foundation (0–6 Months | Fresher)
Programming Fundamentals — Java for Testers
Core Java Essentials
- Data Types, Variables, Type Casting
- Operators: Arithmetic, Relational, Logical, Ternary
- Control Flow: if-else, switch, for, while, do-while, enhanced for
- Arrays — 1D, 2D, iteration
- Strings & String Methods: length, charAt, substring, contains, replace, split, trim
- StringBuilder — when to use over String
OOP Concepts (Tester-Focused)
- Classes, Objects, Constructors
- Encapsulation — private fields, getters/setters
- Inheritance — extends, method overriding, super (BasePage / BaseTest)
- Polymorphism — overloading vs overriding
- Interfaces & Abstract Classes — essential for framework design
- Static vs Instance members
Collections & Modern Java
- ArrayList, HashMap, List / Set / Map interfaces
- Exception Handling — try-catch-finally, checked vs unchecked, custom exceptions
- Java 8+ — Lambdas, Streams (filter/map/collect), Optional, Method References
- try-with-resources — critical for Playwright (auto-closes Playwright/Browser)
Manual Testing Basics (Prerequisite)
- SDLC, STLC — phases and their purpose
- Types of Testing: Functional, Regression, Smoke, Sanity
- Test Case Writing — positive, negative, boundary
- Defect Life Cycle, Severity vs Priority
- Requirement Traceability Matrix (RTM)
- Agile/Scrum — Sprints, User Stories, Definition of Done
Playwright — Getting Started
Introduction
- What is Playwright? Origin at Microsoft (team behind Puppeteer), single API across engines
- Supported browsers: Chromium, Firefox, WebKit (real Safari engine) — all bundled
- Why Playwright over Selenium? Auto-wait, web-first assertions, contexts, tracing, no separate driver binaries
- Playwright vs Selenium vs Cypress — architecture and trade-offs
- Language bindings: Java, TypeScript/JavaScript, Python, .NET
Environment Setup
- Java 17 (LTS) + IntelliJ IDEA / Eclipse
- Maven project + pom.xml structure
- Add com.microsoft.playwright:playwright dependency (1.63.0)
- Install browsers: mvn exec:java -Dexec.mainClass="com.microsoft.playwright.CLI" -Dexec.args="install"
- No WebDriverManager, no chromedriver — Playwright manages its own browser builds
Core Objects — Playwright, Browser, Context, Page
- Playwright.create() — entry point (wrap in try-with-resources)
- BrowserType — chromium(), firefox(), webkit()
- Browser — a running browser process; launch(new LaunchOptions().setHeadless(false))
- BrowserContext — an isolated, incognito-like session (cookies, storage). The key to cheap parallelism
- Page — a single tab; where navigation and interactions happen
- Navigation: navigate(), goBack(), goForward(), reload()
- Page info: title(), url(), content()
Locators — Finding Elements the Playwright Way
- User-facing locators (preferred): getByRole, getByText, getByLabel, getByPlaceholder, getByAltText, getByTitle
- getByTestId — data-testid attributes, the most stable strategy
- CSS & XPath via page.locator("css=...") / locator("xpath=...")
- Chaining & scoping: locator.locator(...), and .filter(new FilterOptions().setHasText(...))
- Handling lists: .nth(), .first(), .last(), .all(), .count()
- Why locators are lazy & auto-retrying — fundamentally different from Selenium WebElement
Actions & Auto-Waiting
- click(), fill(), type()/pressSequentially(), press(), check(), uncheck(), selectOption()
- hover(), dragTo(), setInputFiles(), focus(), clear()
- Auto-waiting — every action waits for the element to be actionable (visible, stable, enabled, receives events)
- Actionability checks replace almost all explicit waits
- getByRole("button").click() waits automatically — no WebDriverWait needed
Web-First Assertions
- assertThat(locator).isVisible() / isHidden() / isEnabled() / isChecked()
- assertThat(locator).hasText(...) / containsText(...) / hasValue(...) / hasAttribute(...)
- assertThat(page).hasTitle(...) / hasURL(...)
- Auto-retrying assertions — they poll until the condition is met or timeout, killing flakiness
- import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat
Test Runner — JUnit 5 / TestNG
- JUnit 5: @Test, @BeforeEach, @AfterEach, @BeforeAll, @AfterAll, @DisplayName
- TestNG: @Test, @BeforeMethod, @AfterMethod, @BeforeClass, priority, groups, dependsOnMethods
- Which to choose? Both work; TestNG is common in Selenium shops, JUnit 5 is default in Playwright docs
- Assertions: JUnit Assertions / TestNG Assert vs Playwright web-first assertions (use web-first for UI state)
- Data-driven: @ParameterizedTest (JUnit) / @DataProvider (TestNG)
- Managing Playwright/Browser/Context/Page lifecycle in @BeforeEach / @AfterEach
Mini Projects — Stage 1
- Application: SauceDemo (saucedemo.com) or OrangeHRM demo
- Automate login with valid/invalid credentials (positive + negative)
- Use getByRole / getByPlaceholder / getByTestId — one strategy per test to practise all
- Rely on auto-wait and web-first assertions — no Thread.sleep, no explicit waits
- Assert error banners, page title and URL after login
- JUnit 5 suite: 10+ test methods with @BeforeEach launching a fresh context
- Application: saucedemo.com or OpenCart demo
- Automate: login, product sort, add-to-cart, checkout flow
- Handle dropdowns with selectOption(); assert cart badge count
- Capture screenshot + trace on failure
- Use a fresh BrowserContext per test for isolation
- Generate the HTML trace and open it with show-trace
Interview Questions — Stage 1
Playwright Basics
- What is Playwright and how is it different from Selenium?
- Explain the object hierarchy: Playwright → Browser → BrowserContext → Page.
- What is a BrowserContext and why is it important?
- What is auto-waiting? Which actionability checks does Playwright run before a click?
- What are web-first assertions and why do they reduce flakiness?
- List the user-facing locators. Why are getByRole and getByTestId preferred?
- How do Playwright locators differ from Selenium’s WebElement?
- How do you handle a dropdown, checkbox and radio button?
- What is the difference between fill() and type()/pressSequentially()?
- How do you install Playwright browsers in a Java Maven project?
Test Runner
- How do you integrate Playwright with JUnit 5 or TestNG?
- Where do you create and close the Browser, Context and Page in a test class?
- How do you run data-driven tests?
- Why should you avoid Thread.sleep() in Playwright?
STAGE 2: Framework Building (6 Months – 1 Year)
Page Object Model (POM)
- Why POM? Separation of concerns, reusability, maintainability
- Page class structure — Locators as fields, actions as methods
- Constructor injection of Page: public LoginPage(Page page)
- BasePage — shared helpers (navigate, waitForLoad, common components)
- Return page objects from methods to enable fluent chaining
- Component objects — reusable header, nav, modal, table
Context & Browser Management
- BrowserFactory / a test base that launches Browser once, new Context+Page per test
- ThreadLocal<Page> / ThreadLocal<BrowserContext> for parallel safety
- Reusing authentication with storageState() — log in once, reuse the session JSON
- LaunchOptions & NewContextOptions — viewport, locale, geolocation, permissions, baseURL
- Headless vs headed, slowMo for debugging
Data-Driven Testing
- JUnit 5 @ParameterizedTest with @CsvSource, @MethodSource, @CsvFileSource
- TestNG @DataProvider returning Object[][]
- Reading Excel with Apache POI — ExcelUtils helper
- Reading JSON with Jackson / Gson — POJO test data
- Reading Properties / .env config files
Framework Structure & Maven
- src/main/java — pages, components, utils, factory; src/test/java — tests, data
- pom.xml: playwright, junit/testng, allure, poi, jackson dependencies
- Maven Surefire / Failsafe — running tests from CLI, forkCount for parallelism
- Maven profiles — dev / staging / prod environments
- mvn test, mvn clean test -Dbrowser=firefox
Reporting
- Allure Reports — @Step, @Attachment, @Description, @Epic/@Feature/@Story
- Attaching Playwright screenshots, traces and videos to Allure
- allure serve target/allure-results to view the dashboard
- JUnit/TestNG HTML reports; ExtentReports as an alternative
Artifacts — Screenshots, Video, Trace
- page.screenshot() — element and full-page (setFullPage(true))
- Video: recordVideoDir on the context; saved on context close
- Trace: context.tracing().start(...) / stop(...) — the killer debugging feature
- Viewing traces: npx playwright show-trace trace.zip (DOM snapshots, network, console, timeline)
- Capturing all three automatically on test failure via a base test / watcher
Logging & Version Control
- Log4j2 / SLF4J — log levels, per-class logger, logging actions and assertions
- Git basics: init, add, commit, push, pull, branching, PRs
- .gitignore for target/, allure-results/, test-output/, trace files
Mini Projects — Stage 2
- Application: phptravels demo or a public booking site
- Build POM: HomePage, LoginPage, SearchPage, BookingPage, ConfirmationPage
- BasePage + BaseTest (Browser once, fresh Context+Page per test)
- Data-driven search from Excel (Apache POI) or JSON
- Allure report with screenshot + trace attached on failure
- Maven + JUnit 5, 15+ tests covering happy path + negatives
- Application: OrangeHRM demo
- Modules: Login, Employee, Leave, Reports
- POM + Data-Driven + Properties config
- Utilities: ExcelUtils, ConfigReader, ScreenshotUtils, TraceUtils
- storageState() to skip repeated logins
- Parallel across Chromium + Firefox with isolated contexts
Interview Questions — Stage 2
- What is the Page Object Model and how do you implement it in Playwright?
- How do you manage Browser, Context and Page across a test suite?
- What is storageState() and how does it speed up your suite?
- How do you run data-driven tests in JUnit 5 / TestNG with Playwright?
- What is a Playwright trace and how do you view it?
- How do you capture video and screenshots on failure?
- How do you integrate Allure reporting?
- How do you configure Maven Surefire to run Playwright tests?
- How do you make your framework parallel-safe?
STAGE 3: Advanced Automation (1–3 Years)
BDD with Cucumber
- Gherkin: Feature, Scenario, Given/When/Then/And/But, Background
- Scenario Outline + Examples for parameterized scenarios
- Tags: @smoke, @regression, @wip
- Step definitions, hooks (@Before/@After) to open/close context
- Sharing Page between steps via dependency injection (PicoContainer)
- JUnit Platform Suite engine to run Cucumber + Playwright
API Automation — Built into Playwright
- APIRequestContext — request().newContext(), get/post/put/patch/delete
- Request options: headers, query params, JSON/form body, auth tokens
- APIResponse — status(), ok(), text(), json via Jackson
- Combining API setup with UI tests (seed data via API, assert in UI)
- Reusing browser cookies/session between API and UI
- When to also learn REST Assured (many SDET JDs still ask for it)
Network Interception & Mocking
- page.route("**/api/**", route -> ...) — intercept requests
- route.fulfill(...) — mock responses; route.abort() — block resources
- route.fetch() + modify — alter live responses
- Waiting for responses: page.waitForResponse(...)
- Testing error states, slow networks and offline scenarios deterministically
Cross-Browser & Parallel Execution
- Chromium / Firefox / WebKit from the same test code
- Parallel with isolated BrowserContexts — lightweight vs Selenium Grid nodes
- JUnit 5 parallel config / TestNG parallel + ThreadLocal
- Maven Surefire forkCount / parallel
- Device emulation: Playwright.devices for mobile viewports & user agents
CI/CD Integration
Jenkins
- Freestyle vs Pipeline; Jenkinsfile declarative stages: Checkout, Build, Test, Report
- Install browsers step; run mvn test headless; publish Allure
- Parameterized builds (browser, env, tag); cron / SCM polling
GitHub Actions & GitLab CI
- GitHub Actions: setup-java, cache, mvn test, upload traces/reports as artifacts
- Microsoft’s official Playwright container image for CI
- GitLab CI: stages, jobs, Docker executor
Docker
- mcr.microsoft.com/playwright/java — official image with browsers + deps preinstalled
- Dockerfile for the test project; running headless in a container
- docker-compose for spinning up the app-under-test + tests
Mobile & Component Testing
- Mobile emulation via devices (viewport, UA, touch) — not real devices
- For real mobile apps you still need Appium (out of Playwright’s scope)
- Visual comparison: screenshot diffing; Applitools integration for AI visual testing
Mini Projects — Stage 3
- Application: ParaBank (parabank.parasoft.com)
- Features: Login, Account Summary, Transfer Funds, Bill Pay
- Step defs with PicoContainer sharing Page/Context
- Hooks open a fresh context; screenshot + trace on failure
- API validation inside UI scenarios using APIRequestContext
- Allure + Jenkins pipeline
- Target: reqres.in / restful-booker
- CRUD via APIRequestContext with Jackson POJOs
- Chained scenarios: create → login → get → update → delete
- Mock a failing endpoint with page.route to test UI error handling
- GitHub Actions CI with trace artifacts on failure
Interview Questions — Stage 3
- How does Playwright do API testing? What is APIRequestContext?
- How do you intercept and mock network requests?
- How does Playwright achieve parallelism without Selenium Grid?
- How do you run cross-browser tests? How is WebKit useful?
- How do you emulate a mobile device?
- How do you integrate Playwright with Jenkins / GitHub Actions?
- How do you run Playwright in Docker?
- How do you combine API setup with UI assertions in one test?
- How do you debug a failing test with traces?
STAGE 4: Lead / SDET / Architect Level (3–5 Years)
Design Patterns & SOLID
- POM (foundation), Factory (BrowserFactory), Singleton (config), Builder (test data), Strategy (browser choice), Fluent interface (chained page objects)
- SOLID: Single Responsibility (page vs assertions), Open/Closed, Liskov, Interface Segregation, Dependency Inversion (inject Page)
- Clean code: meaningful names, DRY utilities, small focused methods, review checklists
Test Architecture & Strategy
- Test pyramid: Unit (70%) > Integration (20%) > E2E (10%)
- What to automate vs not — ROI, critical paths, risk-based
- Flaky-test strategy — how Playwright’s auto-wait + trace reduces flake at the source
- Shift-left, fast feedback in CI, suite maintenance
Enterprise Framework Design
- Modules: core (context factory, base classes), pages, components, utils, api, tests, resources
- Config management: multi-env properties, ConfigReader (singleton), secrets via Vault / CI credentials
- Reporting strategy: Allure dashboards, Slack/Teams notifications, JIRA bug auto-creation
- storageState-based auth architecture across roles
Cloud & Scaling
- BrowserStack / LambdaTest — running Playwright via connectToRemote / CDP endpoints
- Sharding large suites across CI runners
- Microsoft Playwright Testing service (cloud browsers) — awareness
AI in Test Automation (2025/2026)
- AI-assisted authoring: codegen, and LLMs (Claude/Copilot) generating page objects and step defs
- Self-healing locators & visual AI (Applitools)
- Playwright MCP — driving the browser from AI agents; relevant to your Agentic AI track
- AI for flaky-test triage and root-cause from traces
Leadership Skills
- Automation strategy document — scope, tools, timelines, ROI
- Mentoring, code reviews, onboarding docs
- Stakeholder reporting — coverage, defect prevention
- Hiring — JD definition, technical interviews
Tools Mastery — Stage 4
| Category | Tools | Purpose |
|---|---|---|
| Language | Java 17+ (also TypeScript) | Primary automation language |
| Framework | Playwright 1.63+ | Cross-browser automation |
| Test Runner | JUnit 5, TestNG | Execution & lifecycle |
| BDD | Cucumber 7+ | Behaviour-driven testing |
| Build | Maven, Gradle | Build & dependency management |
| Reporting | Allure 2, ExtentReports | Dashboards & reporting |
| API | APIRequestContext, REST Assured | API test automation |
| CI/CD | Jenkins, GitHub Actions, GitLab CI | Pipeline integration |
| Containers | Docker, Playwright image | Containerized execution |
| Cloud | BrowserStack, LambdaTest | Cross-browser cloud testing |
| Visual | Applitools, screenshot diff | Visual regression |
| AI | Playwright MCP, Copilot, Claude | AI-assisted testing |
| Code Quality | SonarQube, Checkstyle | Quality gates |
| IDE | IntelliJ IDEA | Development environment |
Mini Projects — Stage 4
- Full stack: Playwright + Cucumber + JUnit 5 + APIRequestContext
- Modules: Web UI, API, network mocking
- Design patterns: POM, Factory, Singleton, Builder, Strategy
- storageState multi-role auth; parallel via contexts
- Jenkins declarative pipeline on Docker agents
- Allure + Slack notification; traces on failure; SonarQube gate
- Applitools Eyes for AI visual regression
- GitHub Actions CI with sharding
- Network mocking for offline/error scenarios
- Performance metrics via CDP (FCP/LCP)
- Trace-based debugging pipeline
Interview Questions — Stage 4 (Lead / SDET)
- Design a Playwright automation framework from scratch for a large e-commerce app.
- How do you make a Playwright suite fast and non-flaky at scale?
- How do you architect authentication across multiple user roles?
- How do you shard and parallelize on CI? Contexts vs multiple browsers.
- When would you still recommend Selenium or Cypress over Playwright?
- How do you use tracing to root-cause an intermittent failure?
- How do you present automation ROI to stakeholders?
Resume-Ready Skills Checklist
Before you apply for SDET roles, you should be able to tick every box below and speak to it with a concrete example from a project.
| Skill Area | You can confidently... |
|---|---|
| Core Playwright | Explain the object model, auto-wait and web-first assertions |
| Locators | Use getByRole/getByTestId; justify the strategy over XPath |
| Framework | Build POM + factory + config + storageState from scratch |
| Data-Driven | Parameterize tests from CSV, JSON and Excel |
| Reporting | Produce Allure reports with screenshots + traces on failure |
| Cross-Browser | Run on Chromium, Firefox, WebKit; emulate mobile |
| Parallel | Run parallel safely with ThreadLocal contexts |
| BDD | Write Cucumber features with a shared Page via DI |
| API | Test APIs and mock/intercept network with Playwright |
| CI/CD | Run tests in GitHub Actions / Jenkins / Docker |
| Debugging | Root-cause failures using the Trace Viewer |
| Architecture | Design a scalable, multi-role framework and defend the choices |
From Fresher to SDET — build it project by project. 🚀
The TypeScript Track
Choosing TypeScript instead of Java? The stages are the same; this is what changes at each one.
PLAYWRIGHT + TYPESCRIPT
Complete Career Roadmap
Fresher → 1 Year → 3 Years → 5 Years
TypeScript | @playwright/test | Fixtures | CI/CD | API | Visual | CT
| Stage | Experience | Role / Designation |
|---|---|---|
| Stage 1 | 0–6 Months (Fresher) | Automation Trainee / Junior SDET |
| Stage 2 | 6 Months – 1 Year | Automation Engineer (TS) |
| Stage 3 | 1–3 Years | Senior SDET |
| Stage 4 | 3–5 Years | Lead SDET / Test Architect |
Playwright’s own team writes the product and docs in TypeScript first — it is the reference binding. The built-in test runner (config, projects, fixtures, parallelism, UI Mode) makes TS the fastest way to a modern, low-maintenance E2E suite, and it is the most in-demand Playwright skill for front-end-heavy and full-stack teams.
STAGE 1: Foundation (0–6 Months | Fresher)
JavaScript & TypeScript Essentials
JavaScript you actually use
- Variables (let/const), template literals, arrays and objects
- Array methods: map, filter, find, forEach, reduce, includes, sort
- Arrow functions and callbacks
- Promises and async/await — the single most important concept for Playwright
- Destructuring — const { page } = ... (how fixtures are consumed)
- Modules: import / export
TypeScript on top
- Types: string, number, boolean, arrays, any, unknown
- Interfaces & type aliases — typing test data and page objects
- Union & optional types (string | number, name?: string)
- Generics at a basic level (base.extend<{ loginPage: LoginPage }>)
- tsconfig basics — Playwright configures this for you
Every Playwright call returns a Promise. If you are not fully comfortable with async/await, learn that first — forgetting await is the #1 cause of confusing, flaky TypeScript tests.
Manual Testing Basics (Prerequisite)
- SDLC, STLC, Agile/Scrum
- Test case design: positive, negative, boundary
- Defect life cycle, severity vs priority
- Types of testing: functional, regression, smoke, sanity
Playwright — Getting Started
- What is Playwright? Chromium/Firefox/WebKit through one API
- npm init playwright@latest — project, browsers, config, samples
- The test runner: test(), expect(), the page fixture
- playwright.config.ts — browsers (projects), baseURL, trace/screenshot policy
- Object model awareness: Browser → Context → Page (the runner manages it)
- Run: npx playwright test; watch/debug in UI Mode (--ui)
Locators, actions, assertions
- User-facing locators: getByRole, getByText, getByLabel, getByPlaceholder, getByTestId
- Actions (await): click, fill, check, selectOption, hover, setInputFiles
- Web-first assertions: await expect(locator).toBeVisible()/toHaveText()/toHaveCount()
- Auto-waiting — why you rarely write explicit waits
Mini Projects — Stage 1
- npm init playwright@latest; write login tests (positive + negative)
- Use getByRole/getByPlaceholder; assert with expect(...).toBeVisible()
- No waits or sleeps — rely on auto-wait
- Explore results in UI Mode and the HTML report
- Automate login → sort → add-to-cart → checkout on SauceDemo
- Data-drive negative logins by looping test() over an array
- Turn on trace: "on-first-retry" and open a trace
Interview Questions — Stage 1
- What is Playwright and how does the TypeScript test runner differ from just the library?
- Explain the page fixture and why you do not set up the browser manually.
- What is auto-waiting and what are web-first assertions?
- List the user-facing locators and why getByRole is preferred.
- Why must every Playwright call be awaited?
- What does playwright.config.ts control?
- How do you run tests and how do you debug them (UI Mode)?
STAGE 2: Framework Building (6 Months – 1 Year)
Page Object Model in TypeScript
- Page classes with readonly Locator fields set in the constructor
- Actions as async methods; return page objects for fluent flows
- Component objects for shared widgets (header, nav, modal)
- Keep locators out of tests entirely
Fixtures — The Core TS Skill
- Custom fixtures with base.extend() to inject page objects and data
- Test vs worker fixtures (per-test vs per-worker setup)
- Automatic fixtures ({ auto: true }) for cross-cutting concerns (logging)
- Override built-ins with test.use({ locale, viewport, ... })
Authentication & storageState
- Setup project that logs in once and saves storageState to JSON
- Config project dependencies so tests start authenticated
- One storageState per role for multi-role apps
Data-Driven & Config
- Loop test() over arrays / JSON / CSV (csv-parse) for data-driven tests
- Projects to run the same tests across browsers and viewports
- Environment config via process.env (baseURL, workers, retries)
Reporting & Artifacts
- Built-in HTML report (npx playwright show-report)
- allure-playwright for rich dashboards
- trace / screenshot / video capture policies in config
- Trace Viewer for debugging failures
Mini Projects — Stage 2
- POM in /pages, custom fixtures injecting page objects
- storageState setup project for authenticated tests
- Data-driven from JSON; projects for chromium + firefox + webkit
- HTML + Allure reports; trace on first retry
Interview Questions — Stage 2
- How do you implement POM in TypeScript?
- What are fixtures and how do they replace a Java base class + factory?
- Difference between test and worker fixtures?
- How do you reuse authentication with storageState and a setup project?
- How do you run the same tests across multiple browsers?
- How do you configure reporting and artifacts?
STAGE 3: Advanced Automation (1–3 Years)
API Testing
- The request fixture (APIRequestContext) — get/post/put/delete
- Typed request/response bodies with interfaces
- expect(response).toBeOK(); status()/json() checks
- API + UI hybrid: seed via API, assert in UI
Network Interception & Mocking
- page.route to intercept; route.fulfill to mock; route.abort to block
- Modify live responses with route.fetch()
- HAR record/replay for offline, deterministic tests
Parallelism, Sharding & Speed
- fullyParallel + workers; test.describe.configure({ mode: "parallel" })
- Sharding across CI machines (--shard) + merging blob reports
- Optimize: storageState, API seeding, block heavy assets
CI/CD & Docker
- GitHub Actions with the official Playwright action/image
- GitLab CI / Jenkins pipelines
- mcr.microsoft.com/playwright Docker image
- Publish HTML report + traces as artifacts
Visual, Accessibility & Component Testing
- Visual: built-in await expect(page).toHaveScreenshot() with baselines (a TS advantage)
- Accessibility: axe-core integration + toMatchAriaSnapshot
- Component testing: @playwright/experimental-ct-react/vue/svelte
Mini Projects — Stage 3
- CRUD via the request fixture with typed bodies
- Mock a failing endpoint to test UI error states
- Visual baselines with toHaveScreenshot + masking
- GitHub Actions matrix + sharding; artifacts on failure
Interview Questions — Stage 3
- How do you test APIs with the request fixture?
- How do you intercept, mock and modify network traffic?
- How does built-in parallelism work, and how do you shard on CI?
- How do you do visual regression with toHaveScreenshot?
- How do you add accessibility checks?
- How do you run Playwright in Docker/CI?
STAGE 4: Lead / Architect Level (3–5 Years)
Framework Architecture & Patterns
- Layered design: config, fixtures, pages/components, api, utils, tests
- Fixture composition for auth, data and page objects
- Design patterns: POM, fixtures-as-DI, builder for test data
- SOLID + clean, typed code; shared libraries across teams
Test Strategy at Scale
- Test pyramid; what to automate at E2E vs component vs unit
- Flaky-test strategy (auto-wait + traces at the source, scoped retries)
- Sharding + parallel to keep large suites fast
- Reporting/observability: dashboards, trends, CI gates
Cloud & Ecosystem
- Microsoft Playwright Testing (cloud browsers), BrowserStack, LambdaTest
- Applitools/Percy for AI visual at scale
- Monorepo integration; sharing config/fixtures as packages
AI in Testing (2025/2026)
- AI-assisted authoring (codegen, Copilot/Claude generating specs & page objects)
- Playwright MCP — driving the browser from AI agents
- AI triage of flaky tests from traces
Leadership
- Automation strategy, ROI, mentoring, code reviews
- Hiring and defining SDET competencies
- Stakeholder reporting on quality and coverage
Tools Mastery — Stage 4
| Category | Tools |
|---|---|
| Language | TypeScript / JavaScript |
| Framework | Playwright 1.63+ (@playwright/test) |
| Runner features | Projects, Fixtures, Sharding, UI Mode |
| API | request fixture (APIRequestContext) |
| Reporting | HTML, Allure, blob (merge) |
| CI/CD | GitHub Actions, GitLab CI, Jenkins, Docker |
| Visual | toHaveScreenshot, Applitools, Percy |
| Component | @playwright/experimental-ct-* |
| Cloud | MS Playwright Testing, BrowserStack, LambdaTest |
| AI | Playwright MCP, Copilot, Claude |
Mini Project — Stage 4
- Fixtures for multi-role auth, page objects and data
- Projects for cross-browser + mobile; setup dependencies
- API + UI hybrid, network mocking, visual baselines
- GitHub Actions: matrix + sharding + merged blob report
- Allure dashboards with trends; CI quality gate
Interview Questions — Stage 4
- Design a scalable Playwright + TypeScript framework for a large app.
- How do you keep a huge suite fast and non-flaky?
- How do you architect multi-role auth with fixtures + storageState?
- How do you shard and merge reports across CI runners?
- When would you choose Java over TypeScript for Playwright?
- How do you present automation ROI and quality metrics?
From first spec to Test Architect — build it project by project. ⚡
FAQs
Should I learn Playwright with Java or TypeScript?
If your team and skills are in Java (for example, coming from Selenium), Java gets you productive fastest. TypeScript has the richest Playwright Test runner features and is common in front-end-heavy teams. The core API is the same.
How long does it take to learn Playwright?
An experienced Selenium tester can be productive in about 30 days. From scratch, expect around 6 months to reach framework-building level with consistent practice.
Is Playwright replacing Selenium?
Playwright is growing fast, especially for new projects, but Selenium remains widely used. Knowing both, and how to migrate between them, is valuable.