Playwright Testing Interview Questions & Answers
All 420 unique questions in one place — 113 easy, 226 medium, 81 hard — grouped by topic.
Practise by topic
Practise the way your interview works
Write a test that logs in and checks the dashboard heading.
Show answer
What is auto-waiting in Playwright?
Show answer
What is Playwright and which browsers does it support?
Show answer
Locator vs ElementHandle?
Show answer
How do you work with iframes?
Show answer
How do you handle a new tab?
Show answer
How do you run a single test or file in Playwright?
Show answer
What is a browser context and why is it cheap?
Show answer
What does the waitUntil option of page.goto do?
Show answer
What is the difference between @playwright/test and the playwright package?
Show answer
How do you select an option from a native select dropdown?
Show answer
What does the channel option do?
Show answer
How do you check a checkbox and verify it is checked?
Show answer
How do you emulate a mobile device in Playwright?
Show answer
Why did you choose to build a career in Playwright automation?
Show answer
What is the difference between page.goto and page.waitForURL?
Show answer
How do you test a site protected by HTTP basic authentication?
Show answer
How do you handle a page that opens a browser permission prompt for notifications?
Show answer
How do you add, read and clear cookies in a browser context?
Show answer
Why choose Playwright over Selenium?
Show answer
How does Playwright compare with Selenium and Cypress?
Show answer
How do you test file downloads and verify their content?
Show answer
How do you test accessibility with Playwright?
Show answer
How do you test geolocation, permissions and time zones?
Show answer
How do you handle dialogs such as alerts?
Show answer
How does visual testing work in Playwright?
Show answer
How do you perform drag and drop and hover?
Show answer
How do you handle iframes in Playwright?
Show answer
How do you handle file uploads and downloads?
Show answer
What is the difference between page, context and browser?
Show answer
How do you do visual regression testing?
Show answer
What are soft assertions?
Show answer
What is the difference between click and dispatchEvent?
Show answer
How do you handle multiple tabs or pop-ups?
Show answer
How do you run tests on mobile viewports?
Show answer
How do you set test timeouts?
Show answer
How do you test a file download?
Show answer
What actionability checks does Playwright run before a click?
Show answer
What does force: true do on an action, and why should you avoid it?
Show answer
How do you use keyboard shortcuts in Playwright?
Show answer
Does headless mode behave differently from headed mode?
Show answer
A product list uses infinite scroll. How do you test that more items load?
Show answer
How do you test a page in dark mode or with reduced motion?
Show answer
Tell me about a time you automated a difficult UI flow.
Show answer
What is the Clock API in Playwright?
Show answer
How does Playwright talk to browsers, and why does that make it less flaky?
Show answer
The app logs in through a third-party OAuth pop-up. How do you automate it?
Show answer
let vs const vs var?
Show answer
What is async/await?
Show answer
What is npm and package.json?
Show answer
How do you handle errors in async code?
Show answer
What are the main data types in JavaScript?
Show answer
What is the difference between TypeScript and JavaScript?
Show answer
What are arrow functions?
Show answer
What is the difference between == and === in JavaScript?
Show answer
What is a Promise and what states can it have?
Show answer
What is the difference between ES modules and CommonJS?
Show answer
How do you read test data from a JSON file and loop over it?
Show answer
What does the nullish coalescing operator do?
Show answer
Tell me how you learned TypeScript quickly for a project.
Show answer
Tell me about a time you learned a new testing tool under a deadline.
Show answer
interface vs type in TypeScript?
Show answer
What are generics in TypeScript?
Show answer
Explain the event loop.
Show answer
What is the difference between map, filter and reduce?
Show answer
What is the difference between null and undefined?
Show answer
What does the optional chaining operator do?
Show answer
What is the difference between a type and an enum in TypeScript?
Show answer
Promise.all vs Promise.allSettled vs Promise.race?
Show answer
What is destructuring and the spread operator?
Show answer
What is the difference between synchronous and asynchronous code?
Show answer
What are interfaces and types in TypeScript?
Show answer
What is hoisting?
Show answer
What are template literals?
Show answer
What are closures?
Show answer
What happens if you forget an await?
Show answer
What are higher-order functions?
Show answer
What are union types and type narrowing in TypeScript?
Show answer
What is the difference between unknown and any in TypeScript?
Show answer
What are Partial, Pick, Omit and Record used for?
Show answer
Write a typed helper that retries an async function a few times.
Show answer
Why turn on strict mode in tsconfig for a test project?
Show answer
How does this behave in arrow functions compared with regular functions?
Show answer
A test uses forEach with an async callback and the checks inside never seem to run. Why?
Show answer
How do access modifiers help in page object classes?
Show answer
How do you read environment variables safely in a TypeScript test project?
Show answer
How do you check that a product list on the page is sorted by price?
Show answer
What is the difference between a type annotation and a type assertion with as?
Show answer
Describe a time strict TypeScript types caught a bug in your test code.
Show answer
How would you type the response of an API call in TypeScript?
Show answer
Why use readonly and as const for test data?
Show answer
What are discriminated unions and how can they model API responses?
Show answer
What is a generic type parameter constraint, such as T extends object?
Show answer
What is the difference between API testing and UI testing?
Show answer
How do you make an API request in Playwright?
Show answer
What is the difference between the request fixture and request.newContext()?
Show answer
What does response.ok() check?
Show answer
How do you send query parameters in an API request?
Show answer
What are idempotent HTTP methods and why do they matter in testing?
Show answer
What is the difference between path parameters and query parameters?
Show answer
Describe a time an API changed without notice and broke your tests.
Show answer
How do you share cookies between API login and UI?
Show answer
How do you mock an API response?
Show answer
How do you test pagination or chained API calls?
Show answer
How do you test file upload via API?
Show answer
How do you handle token refresh in long API test runs?
Show answer
How do you validate an API response in Playwright?
Show answer
What is APIRequestContext?
Show answer
How do you measure API response time?
Show answer
How do you combine API and UI tests?
Show answer
How do you send authentication headers?
Show answer
How do you validate JSON schema?
Show answer
How do you handle GraphQL APIs in Playwright?
Show answer
How do you send a POST request with a JSON body?
Show answer
How do you test API error scenarios?
Show answer
How do you handle rate limits or slow APIs in tests?
Show answer
Write an API test with the request fixture.
Show answer
Write a test that updates a user with PUT and verifies the change.
Show answer
How do you set baseURL and common headers for API tests?
Show answer
How do you test the difference between 401 and 403 responses?
Show answer
An API returns 200 but the body contains an error field. How should your test catch this?
Show answer
Why should you dispose an APIRequestContext?
Show answer
Write a test that deletes a record and confirms it is gone.
Show answer
How do you validate response headers?
Show answer
What does the failOnStatusCode option do?
Show answer
How do you write data-driven API tests with many inputs?
Show answer
An endpoint should reject invalid email addresses. Which negative tests would you write?
Show answer
Tell me about a bug you found through API testing that UI tests missed.
Show answer
How do you create test data through the API before a UI test?
Show answer
How would you design API test coverage for a new endpoint?
Show answer
How do contract tests differ from functional API tests?
Show answer
An API test fails randomly because another test changes the same record. How do you fix it?
Show answer
How do you test an async job API that returns 202 and finishes later?
Show answer
How do you keep API tests independent of environment data?
Show answer
How do you test that duplicate POST requests do not create duplicate orders?
Show answer
How do you test conditional GET requests that use ETag and If-None-Match?
Show answer
An endpoint streams server-sent events. How would you test it with Playwright?
Show answer
How do you verify that an API returns consistent data across two versions of an endpoint?
Show answer
An API receives a payload with an unknown extra field. How do you test what it should do?
Show answer
How do you run tests on three browsers in parallel?
Show answer
How do you run only smoke tests?
Show answer
How do you write a Page Object in Playwright?
Show answer
What are the key options in playwright.config.ts?
Show answer
What is forbidOnly and why use it in CI?
Show answer
CI fails with an error saying the browser executable does not exist. How do you fix it?
Show answer
What is the use block in playwright.config?
Show answer
Tell me about a time you explained a failing test report to a non-technical stakeholder.
Show answer
How do you reuse login state across tests?
Show answer
How do retries work?
Show answer
How do you tag and filter tests?
Show answer
How do you integrate Playwright with Allure or other reports?
Show answer
What are projects in playwright.config?
Show answer
How do you run tests in parallel and control workers?
Show answer
What reporters does Playwright provide?
Show answer
How do you shard tests across machines?
Show answer
How do you structure environment-specific configs in Playwright?
Show answer
How do you run tests in Docker?
Show answer
How do you run Playwright in GitHub Actions?
Show answer
What are fixtures in Playwright?
Show answer
How do you manage test data and environments?
Show answer
How do you organise tests with page object model in Playwright?
Show answer
What does fullyParallel change?
Show answer
How do you publish the Playwright HTML report from a CI pipeline?
Show answer
What does the webServer option do?
Show answer
How do you handle secrets such as passwords and tokens in CI?
Show answer
Tell me about a time a pipeline you owned broke just before a release.
Show answer
Why should the Playwright Docker image version match your package version?
Show answer
Show a config with a setup project and a browser project that reuses its login.
Show answer
What does maxFailures do?
Show answer
Tell me about setting up CI for a test suite.
Show answer
How do you keep test code, page objects and utilities organised as a repository grows?
Show answer
What does eslint-plugin-playwright help with?
Show answer
How would you structure a large Playwright framework for a team?
Show answer
How do you reduce the execution time of a 2000-test suite?
Show answer
Tests are flaky in CI. How do you debug them?
Show answer
Design a Playwright framework for a 500-test suite.
Show answer
How do you combine reports from sharded CI jobs?
Show answer
Where should Playwright tests run in a delivery pipeline?
Show answer
Ten engineers write tests and quality varies a lot. How do you keep the framework consistent?
Show answer
How do you manage flaky tests without hiding real failures?
Show answer
Retries make the build green, but nobody notices flaky tests. How do you surface them?
Show answer
How can you run only the tests affected by a code change?
Show answer
How do you upgrade Playwright safely in a large suite?
Show answer
Describe how you mentored junior engineers on your test framework.
Show answer
Tell me about a disagreement with a developer over a failing test.
Show answer
How do you run tests against a preview deployment created for each pull request?
Show answer
What is a locator in Playwright?
Show answer
What does getByRole do and why is it the first-choice locator?
Show answer
What is the difference between getByText and getByLabel?
Show answer
When should you use getByTestId?
Show answer
What is the difference between toHaveText and toContainText?
Show answer
How is toBeVisible different from toBeAttached?
Show answer
How do you assert the number of rows in a table?
Show answer
Write code to fill a login form using label-based locators.
Show answer
How do you change the default assertion timeout?
Show answer
What is the difference between await expect(locator) and a plain expect on a value?
Show answer
Tell me about a time you replaced brittle locators in an existing suite.
Show answer
A multi-select filter test passes even when an extra option stays selected. How do you tighten it?
Show answer
What is the difference between waitForSelector and expect with locator?
Show answer
Which locators does Playwright recommend?
Show answer
What are web-first assertions?
Show answer
How do you handle date pickers and custom dropdowns?
Show answer
How do you handle shadow DOM?
Show answer
What is locator strictness in Playwright?
Show answer
How do you filter a list of locators by text or by a child element?
Show answer
How does expect.poll work and when would you use it?
Show answer
A locator matches three Delete buttons and the test fails with a strict mode violation. How do you fix it?
Show answer
Your test clicks a button before the page's JavaScript has attached its handler, so nothing happens. What do you do?
Show answer
What do locator.and() and locator.or() do?
Show answer
How do you assert an element's CSS class, attribute or value?
Show answer
What are nth(), first() and last(), and why are they risky?
Show answer
A toast message disappears after two seconds and the assertion on it is flaky. How do you test it reliably?
Show answer
How do you locate elements inside a specific row or card?
Show answer
How do you verify a page's URL and title after navigation?
Show answer
Describe a time a test passed but the feature was actually broken.
Show answer
How do you balance pressure to automate quickly against writing stable tests?
Show answer
A test must confirm that an error banner does not appear, but it always waits the full timeout. How do you fix it?
Show answer
Describe a time you convinced developers to add accessible labels or test ids.
Show answer
How would you handle a very flaky element that appears after an animation?
Show answer
What is expect(...).toPass and how is it different from expect.poll?
Show answer
How do you design a locator strategy for a team so tests survive UI redesigns?
Show answer
Developers keep changing CSS class names and 40 tests break every sprint. How do you fix this long term?
Show answer
How do you write a custom matcher with expect.extend?
Show answer
A test checks a price that is formatted differently per locale. How do you make the assertion robust?
Show answer
What are the built-in fixtures page, context, browser and request?
Show answer
What do beforeAll and afterAll do?
Show answer
How do you override options like baseURL or viewport for one file?
Show answer
What does test.describe do?
Show answer
What are test.skip, test.fixme and test.fail?
Show answer
In what order do hooks and fixtures run?
Show answer
Write a beforeEach hook that opens the home page and accepts the cookie banner.
Show answer
Why is sharing state between tests through module-level variables a bad idea?
Show answer
How do you skip a test only in WebKit?
Show answer
How do you use test.step and test annotations?
Show answer
What is the difference between beforeEach and fixtures?
Show answer
How do you handle authentication to avoid logging in every test?
Show answer
What are fixtures and how do you create a custom one?
Show answer
What are global setup and teardown?
Show answer
What is the difference between test-scoped and worker-scoped fixtures?
Show answer
Write a custom fixture that gives a logged-in page.
Show answer
What happens before and after await use() in a fixture?
Show answer
Why can beforeAll run more than once in a Playwright run?
Show answer
What are automatic fixtures?
Show answer
A beforeAll creates one user and tests in the same file fail randomly in parallel mode. Why?
Show answer
How do you provide page objects as fixtures?
Show answer
What are the serial and parallel modes of test.describe.configure?
Show answer
What is testInfo and what can you do with it?
Show answer
Test data is left behind when tests fail midway. How do you guarantee cleanup?
Show answer
How do you attach a screenshot or log to the report from inside a test?
Show answer
Tell me about a time you refactored duplicated setup into fixtures.
Show answer
How do you share one authenticated API context across all tests in a worker?
Show answer
How do you combine fixtures from several files with mergeTests?
Show answer
A setup fixture creates expensive test data and suite time has doubled. How do you redesign it?
Show answer
What is a fixture option and how do you define one?
Show answer
How do project dependencies differ from globalSetup?
Show answer
How do you test a flow that needs two user roles, such as an admin and a customer, in one test?
Show answer
A worker-scoped fixture holds shared data and some tests see stale values. How do you fix it?
Show answer
Describe a time a broken fixture failed many tests at once and how you handled it.
Show answer
Describe a time you designed a fixture layer that other teams adopted.
Show answer
What does page.route do?
Show answer
What is the difference between route.fulfill, route.continue and route.abort?
Show answer
How do you block images and fonts to speed up tests?
Show answer
Why mock the network in UI tests at all?
Show answer
Describe a time you argued against mocking every API in the suite.
Show answer
What is a HAR file?
Show answer
How do you mock third-party APIs in UI tests?
Show answer
How do you wait for a network response in Playwright?
Show answer
How do you mock network requests?
Show answer
How do you change part of a real API response?
Show answer
What is the difference between page.route and context.route?
Show answer
How do you mock network traffic using a HAR file?
Show answer
Why should you start waitForResponse before the action that triggers it?
Show answer
Your mocked route never fires. What do you check?
Show answer
How do you test how the UI handles a 500 error from the orders API?
Show answer
How do you simulate a slow API to test a loading spinner?
Show answer
How do you listen to all network requests on a page?
Show answer
How do you assert that a request was sent with the correct payload?
Show answer
How do you test offline behaviour?
Show answer
How does URL matching work in page.route?
Show answer
A third-party analytics script makes tests slow and flaky. What do you do?
Show answer
How do you mock one GraphQL query when all calls go to /graphql?
Show answer
How do you add or change request headers for only some requests?
Show answer
The app polls a status endpoint every few seconds. How do you test the change from Pending to Done?
Show answer
Tell me about a time mocking helped you test a hard edge case.
Show answer
How do you return a fake JSON response that depends on the request body?
Show answer
How do you test that the app retries a request that failed the first time?
Show answer
When should you avoid mocking, and how do you balance mocked and real tests?
Show answer
Mocked responses drift from the real API and tests pass while production breaks. How do you prevent this?
Show answer
How do you mock WebSocket traffic in Playwright?
Show answer
A feature is controlled by a flag served from a config API. How do you test both states?
Show answer
How do you mock a paginated endpoint that returns different data per page?
Show answer
How can service workers interfere with network mocking?
Show answer
A fixture mocks every /api call, but one test needs a different response for /api/cart. How do you override it?
Show answer
What is the Playwright Inspector and how do you open it?
Show answer
What does page.pause() do?
Show answer
How do you open a trace file?
Show answer
What do headed mode and slowMo do?
Show answer
What is the HTML report and how do you open it?
Show answer
What does the Pick locator tool do?
Show answer
What does npx playwright test --last-failed do?
Show answer
Tell me about a hard bug you found while debugging a test.
Show answer
Tell me about the first time you used the trace viewer to solve a failure.
Show answer
How can you view a trace file without a local Playwright install?
Show answer
How does Playwright's trace viewer help?
Show answer
What is codegen?
Show answer
How do you debug a Playwright test?
Show answer
How do you take screenshots and videos?
Show answer
What are the options for the trace setting in playwright.config?
Show answer
What does a Playwright trace contain?
Show answer
What is UI mode and how is it different from --debug?
Show answer
How do you record a trace manually with the tracing API?
Show answer
How do you capture browser console messages and page errors?
Show answer
How do you fail a test if the page logs any console error?
Show answer
What does the DEBUG=pw:api environment variable do?
Show answer
How do you read a Playwright timeout error message?
Show answer
A trace shows the click landed on an overlay instead of the button. How do you fix it?
Show answer
How do you debug a test in VS Code with the Playwright extension?
Show answer
How do test.slow() and longer timeouts help or hurt debugging?
Show answer
How do you reproduce a flaky test locally?
Show answer
How do you inspect a specific network request in the trace viewer?
Show answer
A test fails with 'Target page, context or browser has been closed'. What usually causes it?
Show answer
A test passes locally but fails in CI with a timeout on a click. How do you use the trace?
Show answer
The suite has a 3 percent flaky rate. How do you find and fix the causes systematically?
Show answer
What are the trade-offs of trace 'on' versus 'retain-on-failure' in CI?
Show answer
A test fails only in WebKit. How do you investigate?
Show answer
Tests pass with one worker but fail with eight. How do you debug this?
Show answer
Describe how you handled a flaky test that was blocking releases.
Show answer
What happens the first time toHaveScreenshot runs and no baseline image exists?
Show answer
What is the difference between toHaveScreenshot and toMatchSnapshot?
Show answer
Why should CSS animations be disabled for visual comparisons?
Show answer
Where does Playwright store baseline screenshots and how are the files named?
Show answer
How do you update screenshot baselines after an intended UI change?
Show answer
Write a test that compares only the pricing card instead of the full page.
Show answer
How do you check colour contrast in Playwright tests?
Show answer
A screenshot test fails with only a few pixels different because of anti-aliasing. What do you do?
Show answer
A screenshot of a search page is flaky because a blinking text cursor appears in the input. How do you fix it?
Show answer
What do maxDiffPixels, maxDiffPixelRatio and threshold control in a screenshot comparison?
Show answer
Write a visual assertion that masks a live clock and an ad banner.
Show answer
Visual tests pass on developers' laptops but fail in CI with tiny font differences. Why, and how do you fix it?
Show answer
How can you apply extra CSS only while a screenshot is taken?
Show answer
Write an accessibility scan that checks only WCAG 2.1 A and AA rules.
Show answer
How do you exclude a third-party widget or switch off one rule in an axe scan?
Show answer
What do toHaveAccessibleName and toHaveAccessibleDescription check?
Show answer
What is an ARIA snapshot and how does toMatchAriaSnapshot work?
Show answer
Write a test that checks keyboard Tab order through a login form.
Show answer
What can automated accessibility tools not catch?
Show answer
How do you attach axe results to the Playwright HTML report?
Show answer
How do you run the same visual tests at mobile, tablet and desktop sizes?
Show answer
Why are screenshot baselines specific to browser and operating system?
Show answer
Tell me about a time an accessibility check caught a real issue before release.
Show answer
Baselines are always rendered in Docker, yet the repo has separate Windows and Linux image files. How do you keep one baseline per browser?
Show answer
A designer changes the primary button colour and 300 visual tests fail at once. How do you handle it?
Show answer
How would you design a visual testing strategy for a large web application?
Show answer
An axe scan reports 40 violations on a legacy page. How do you add accessibility checks without blocking every build?
Show answer
How do you test that a modal dialog traps focus and returns it when closed?
Show answer
Images load lazily and are sometimes missing from full-page screenshots. How do you make them stable?
Show answer
When is visual regression testing a poor fit?
Show answer
Describe how you convinced a team to adopt accessibility testing.
Show answer
What is Playwright component testing?
Show answer
How do you set up Playwright component testing in an existing React project?
Show answer
Write a component test for a Counter that increments on click.
Show answer
What does the mount fixture return?
Show answer
How is a component test different from an end-to-end test?
Show answer
Which frameworks does Playwright component testing support?
Show answer
Component tests render without any styling. What is missing?
Show answer
Why are component tests usually faster than end-to-end tests?
Show answer
How is a Playwright component test different from a Jest unit test with jsdom?
Show answer
Write a component test that checks an onSubmit callback receives the form data.
Show answer
What is the playwright/index.tsx file used for?
Show answer
How do you wrap a component in a theme or router provider using hooksConfig?
Show answer
How do you change a mounted component's props during a test?
Show answer
How do you mock API calls made by a component in a component test?
Show answer
How do you pass slots and listen to events in a Vue component test?
Show answer
What is ctViteConfig and when do you need it?
Show answer
Component tests fail because imports like @/utils cannot be resolved, though the app builds fine. How do you fix it?
Show answer
How do you take visual snapshots of each component state in component tests?
Show answer
When should you choose a component test over an end-to-end test?
Show answer
Write a component test that checks a required field shows an error on blur.
Show answer
Component and end-to-end tests run together and slow down every commit. How do you separate them?
Show answer
How do you test a dropdown component's keyboard support in a component test?
Show answer
Tell me about a time you introduced component tests to a frontend team.
Show answer
Why do component tests run in two processes, and what limits does that create?
Show answer
A component under test needs a complex class instance as a prop and the test fails to serialise it. What do you do?
Show answer
The team wants to replace all end-to-end tests with component tests to save time. What do you advise?
Show answer
How do you test a component that reads from a global state store?
Show answer
A component test passes alone but fails when the full component suite runs. What do you check?
Show answer
What are the risks of relying on an experimental testing feature in a large codebase?
Show answer
Describe a time you had to decide which testing level a feature belonged to.
Show answer
What is a worker process in Playwright Test?
Show answer
How many workers does Playwright use by default, and how do you change it?
Show answer
How do you use more than one reporter in the same run?
Show answer
What does the JUnit reporter produce and why do CI tools need it?
Show answer
What does the github reporter do?
Show answer
What does --repeat-each do?
Show answer
How do you open an HTML report downloaded from a CI artifact?
Show answer
What does the open option of the HTML reporter control?
Show answer
What is the difference between the list, line and dot reporters?
Show answer
What is the difference between workerIndex and parallelIndex?
Show answer
Write a fixture that gives each parallel worker its own test account.
Show answer
Why does Playwright start a new worker after a test fails?
Show answer
Write a GitHub Actions job that runs the suite in four shards.
Show answer
What is the blob reporter and why does it exist?
Show answer
Which methods does the Playwright Reporter interface provide?
Show answer
What does the reportSlowTests option do?
Show answer
CI runners have 2 CPU cores and workers is set to 8. Tests start timing out randomly. Why?
Show answer
Parallel tests create users with the same email and fail with 'already exists'. How do you fix it?
Show answer
How do you run one group of tests serially while the rest of the suite runs in parallel?
Show answer
How do you add build details such as the commit and environment to the test report?
Show answer
What does the JSON reporter output and how would you use it?
Show answer
What does outputDir contain and why does it matter in parallel runs?
Show answer
Tell me about a time you reduced pipeline time with parallel runs or sharding.
Show answer
Two test files edit the same global settings page and break each other when run in parallel. How do you handle it?
Show answer
How does sharding split tests when fullyParallel is on compared with off?
Show answer
Write a minimal custom reporter that prints the titles of failed tests at the end.
Show answer
One shard finishes in 4 minutes and another takes 15. How do you balance them?
Show answer
How would you build a flaky-test dashboard from Playwright results?
Show answer
How do you decide how many shards a suite should use?
Show answer
How do you rerun only the tests that failed in a sharded CI run?
Show answer
Describe a time you improved how test results were reported to the team or managers.
Show answer
Frequently asked questions
Is Playwright in demand for testing jobs in India?
Yes. Many product companies, startups and service firms in India now list Playwright alongside or instead of Selenium for web automation roles. Job posts for QA automation engineers and SDETs often ask for Playwright with TypeScript, API testing and CI experience. Knowing Selenium still helps for older projects, but Playwright skills give you an edge for new projects and modern frontend teams.
Should I learn Playwright with JavaScript or TypeScript?
Start with JavaScript basics such as promises and async/await, then move to TypeScript as soon as you are comfortable. Most company frameworks use TypeScript because types catch mistakes early and make page objects easier to maintain. Interviewers frequently ask TypeScript questions like interface versus type, generics and union types, so learning both is the safest choice for interviews.
What kind of coding round should I expect in a Playwright interview?
Freshers usually get JavaScript basics like reversing a string, removing duplicates or working with arrays and objects, plus writing a simple Playwright test. Mid-level candidates may be asked to automate a form, mock an API, write a custom fixture or a page object live. Senior candidates are often asked to design a framework or review existing test code for flakiness and structure.
Do I need Selenium experience to get a Playwright job?
No, but it helps you answer comparison questions. Many interviewers ask why Playwright over Selenium, so understand differences such as auto-waiting, browser contexts, built-in tracing, network mocking and the test runner. If you have Selenium experience, explain how you would migrate a suite. If you do not, focus on strong Playwright projects and clear fundamentals.
How can a fresher show Playwright skills without work experience?
Build a small public project on a demo e-commerce or to-do site with page objects, fixtures, API tests, network mocks and a CI pipeline that publishes the HTML report. Write a clear README explaining the structure. In interviews, walk through why you chose your locators and how you debugged a failure with the trace viewer. This shows practical skill better than certificates alone.
Which topics matter most for experienced Playwright interviews?
For two or more years of experience, expect deep questions on fixtures and setup projects, authentication with storageState, network mocking, parallel runs and sharding, CI pipelines, reporting and handling flaky tests. Scenario questions like a test failing only in CI are very common. Senior rounds add framework architecture, test strategy, upgrade planning and leading or mentoring a team.