Meta Playwright Testing Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Meta hiring for Playwright Testing roles
Meta Platforms owns Facebook, Instagram, WhatsApp, Messenger and Reality Labs. Its India presence includes business, partnerships and engineering teams, with WhatsApp and payments work closely tied to the Indian market. Technical hiring in India covers software engineering, data science, data engineering and analytics roles focused on product growth and measurement.
For Playwright Testing roles, this Meta practice set focuses most on Framework Design and CI/CD (8), API Testing (6), Component Testing (5), Playwright Core (4). It has 4 easy, 23 medium, 13 hard questions, so you can start easy and work up to the harder ones.
Company type
Product
Headquarters
Menlo Park, California, USA
Main India offices
Gurugram, Bengaluru, Hyderabad, Mumbai
Meta Playwright Testing interview process
Recruiter screening
Technical phone screen (coding or SQL)
Onsite coding rounds
Product sense or system design round
Behavioural round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for MetaStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
How do you test how the UI handles a 500 error from the orders API?
Mock the endpoint with route.fulfill({ status: 500, json: { message: 'Server error' } }), then open the page. Assert the user sees a friendly error message and a retry button, and that no broken half-rendered table appears. Then make the retry return 200 and check the data loads. This covers a path that is hard to trigger on a real server.
The blob reporter writes a compact archive of everything about a run, including results, attachments and traces, into the blob-report folder. It is meant for machines rather than people. Each shard produces one blob, and npx playwright merge-reports later combines them into a single HTML, JUnit or JSON report. Without it, every shard would produce its own separate HTML report.
03
Show a config with a setup project and a browser project that reuses its login.
Set httpCredentials with a username and password in the use block of the config, or pass it to browser.newContext. Playwright then answers the browser's authentication challenge automatically, so no pop-up appears. Read the values from environment variables rather than hard-coding them. You can also limit the credentials to a specific origin with the origin field.
05
Write a component test for a Counter that increments on click.
await page.getByRole('link', { name: 'Orders' }).click();
await expect(page).toHaveURL(/\/orders$/);
await expect(page).toHaveTitle('My Orders | Shop');
// both retry, so no need to wait for navigation manually
08
Tell me about a disagreement with a developer over a failing test.
Situation: a developer said a failing checkout test was flaky and asked to skip it before release. Task: decide based on evidence. Action: I shared the trace showing the total stayed wrong after a coupon was removed and reproduced it manually. Result: we agreed it was a real bug, it was fixed before release, and we started reviewing traces together.
Turn on trace: 'on-first-retry', open the trace viewer, check network and timing, replace hard waits with web-first assertions, isolate test data and check for sharding conflicts.
A context created with request.newContext() holds cookies, connections and stored responses in memory. Calling await context.dispose() frees them, and any later call on it fails. Without disposing, long runs can leak memory. The built-in request fixture is disposed automatically, so this matters for contexts you create in fixtures or helpers.
12
How do you wait for a network response in Playwright?
The request fixture returns the full body only after the stream ends, so for a short finite stream you can read text() and parse each data line. For long-lived streams, test in the browser: open the page that uses EventSource, or open it inside page.evaluate, collect events into an array and assert with expect.poll. Mock the source with a route when you need precise timing.
14
What is the difference between null and undefined?
The call log will say another element intercepts pointer events. Find what the overlay is, such as a loading mask, cookie banner or chat widget. Wait for it to disappear with expect(overlay).toBeHidden(), or close it in a fixture. Do not use force: true, because it hides a real issue: a user would also be blocked by that overlay.
17
How do you upgrade Playwright safely in a large suite?
Read the release notes for breaking changes and deprecations. Upgrade on a branch, update the browsers and the Docker image to the same version, and run the full suite on all projects several times. Compare visual snapshots, which often change after browser updates. Upgrade regularly in small steps rather than skipping many versions.
18
Describe a time you convinced developers to add accessible labels or test ids.
Situation: many inputs had no labels, so our tests relied on long CSS selectors that broke often. Task: get stable hooks without slowing developers. Action: I listed the worst screens, showed how getByLabel tests read and how the same labels help screen reader users, and offered to raise small pull requests myself. Result: the team added labels to new work as a rule and locator breakages dropped sharply.
ctViteConfig is an option in the use block of playwright-ct.config.ts that passes extra Vite settings to the component bundle. You need it when the app relies on path aliases, plugins, environment defines or special asset handling that Playwright's default Vite setup does not know about. A typical case is adding resolve.alias so imports like @/components work in tests.
21
Write a test that deletes a record and confirms it is gone.
Write a short contribution guide with examples. Add ESLint with the Playwright plugin and the no-floating-promises rule, plus Prettier, enforced in CI. Require reviews from framework owners for shared fixtures and page objects. Provide generators or templates for new page objects, and run regular sessions to review flaky tests together.
23
What are discriminated unions and how can they model API responses?
A discriminated union is a union of object types that share one literal field, such as status: 'ok' with data, or status: 'error' with a message. Checking the status field narrows the type, so TypeScript only allows data in the ok branch. In test helpers this forces you to handle the error case and prevents reading fields that do not exist.
24
The team wants to replace all end-to-end tests with component tests to save time. What do you advise?
Agree to move detailed UI checks down to component tests, because they are faster and more precise. But keep a thin layer of end-to-end tests for critical journeys like signup, checkout and payment, since component tests use mocked data and cannot catch broken APIs, routing or deployment issues. Decide per risk, measure runtime savings, and track escaped defects after the change.
25
An API receives a payload with an unknown extra field. How do you test what it should do?
First confirm the contract: should unknown fields be rejected with 400 or silently ignored? Then send a valid body with an extra field and assert that behaviour. If they are ignored, fetch the record and check the extra field was not stored. Also try sending a field that should be read-only, such as role or id, to catch mass assignment bugs.
26
A component under test needs a complex class instance as a prop and the test fails to serialise it. What do you do?
Create a small test story component in a separate file that builds the class instance inside the browser and renders the real component with it. The test then mounts the story with simple props, such as an id or a scenario name. This keeps the data creation on the browser side of the boundary and also documents test scenarios as reusable stories.
Look for state that leaks between mounts: global stores or singletons created at module level in index.tsx, timers or listeners not cleaned up on unmount, and shared mock data mutated by one test. Make the providers create fresh state in beforeMount each time and reset mocks per test. Running with --repeat-each and a single worker often reproduces the leak quickly.
29
How do you mock a paginated endpoint that returns different data per page?
Run a fast smoke set on every pull request against a preview or test environment, so feedback arrives in minutes. Run the full regression suite on merge to main or nightly, sharded across machines. After a deploy, run a few read-only production smoke checks. Match the suite size to the stage so pipelines stay fast but coverage is complete.
35
How would you build a flaky-test dashboard from Playwright results?
Write a custom reporter or parse the JSON report after each CI run, and store per test: id, status, retry count, duration, branch and commit. A test that passed after a retry counts as flaky. Aggregate over the last few hundred runs to rank tests by flake rate and duration, and show trends. Use it to assign owners and quarantine tests above an agreed threshold.
The use block sets default options for every test, such as baseURL, headless, viewport, locale, trace, screenshot and video. Each project can override them in its own use block, and a file can override again with test.use. This layered setup keeps shared settings in one place while still allowing browser- or file-specific changes.
Situation: a new checkout redesign was ready for release. Task: I had just added an axe scan to our Playwright smoke tests. Action: the scan flagged that the payment form inputs had placeholder text but no labels, and a keyboard test showed the pay button was unreachable with Tab. I raised it with screenshots and the rule links. Result: the developer fixed both in a day and the release went out on time.
39
Write a visual assertion that masks a live clock and an ad banner.
Use locator.press('Enter') for a key on a focused element, or page.keyboard.press('Control+A') for page-level shortcuts. Modifiers combine with a plus sign, and ControlOrMeta picks Ctrl on Windows and Linux and Cmd on macOS. keyboard.down and keyboard.up hold keys. Use pressSequentially only when the app needs real keystrokes, such as autocomplete.
Tips to crack the Meta Playwright Testing interview
For data science roles, practise product sense questions such as defining success metrics for Instagram Reels or WhatsApp Status.
Solve two medium coding problems within about 40 minutes, as Meta coding rounds are known for being fast-paced.
Read Meta's company values like Move Fast and Focus on Long-Term Impact and link your behavioural answers to them.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Meta interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Meta Playwright Testing interview?
Candidates usually go through 5 stages: Recruiter screening; Technical phone screen (coding or SQL); Onsite coding rounds; Product sense or system design round; Behavioural round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Meta Playwright Testing interview?
This practice set leans on Framework Design and CI/CD (8), API Testing (6), Component Testing (5), Playwright Core (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Meta interviewers ask you to walk through real work.
Are these the exact questions asked at Meta?
No. These are curated practice questions that match the skills and difficulty usually tested in product interviews like Meta's. They are not a leaked or verified list of past questions.
Where does Meta hire Playwright Testing professionals in India?
Meta has large teams in Gurugram, Bengaluru, Hyderabad, Mumbai. Openings and locations change often, so check the Meta careers page and filter by city and experience.
Playwright Testing questions for similar companies