Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Stripe hiring for Playwright Testing roles
Stripe is a financial infrastructure company providing online payments, billing, connect platforms, fraud prevention through Radar, and other APIs for businesses. It has an engineering presence in Bengaluru along with business teams serving Indian merchants. It hires in India for software engineers, data and analytics roles, and integration-focused technical positions.
For Playwright Testing roles, this Stripe practice set focuses most on Visual & Accessibility Testing (5), Locators and Assertions (5), Fixtures and Hooks (4), Framework Design and CI/CD (4). It has 2 easy, 31 medium, 7 hard questions, so you can start easy and work up to the harder ones.
Company type
Fintech
Headquarters
South San Francisco, California, USA
Main India offices
Bengaluru
Stripe Playwright Testing interview process
Recruiter screening
Technical phone screen (practical coding)
Onsite coding and bug squash rounds
Integration or design round
Behavioural round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for StripeStart 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 override options like baseURL or viewport for one file?
Call test.use at the top of the file or inside a describe block, for example test.use({ viewport: { width: 375, height: 812 }, locale: 'hi-IN' }). The options apply only to tests in that scope. Options you can set this way include baseURL, storageState, colorScheme and extraHTTPHeaders. Global defaults stay in the use block of playwright.config.
maxFailures stops the run after a set number of test failures, for example maxFailures: process.env.CI ? 10 : undefined. If an environment is down and every test fails, the build stops early instead of burning an hour of CI time. Set it high enough that a few real failures still show their full picture.
03
How do test.slow() and longer timeouts help or hurt debugging?
test.slow() triples the timeout for a test that is genuinely long, such as a report export. It is honest and visible in code. But raising timeouts to make a flaky test pass hides the real cause, such as a missing wait or slow backend, and makes failures take longer. Investigate the trace first and change timeouts only with a reason.
// scan the page but skip the chat widget you do not own
const results = await new AxeBuilder({ page })
.include('main')
.exclude('#third-party-chat')
.disableRules(['duplicate-id'])
.analyze();
expect(results.violations).toEqual([]);
// log a ticket for anything you exclude
06
How do you validate an API response in Playwright?
Declarations of var and functions are moved to the top of their scope at compile time; let and const are hoisted but stay in the temporal dead zone until declared.
08
How do you verify a page's URL and title after navigation?
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
09
How do you return a fake JSON response that depends on the request body?
Create a worker-scoped fixture that calls request.newContext with baseURL and an auth header, or logs in through the API and keeps the cookies. Pass it to use, and dispose it after use returns. Every test in that worker gets the same ready context, so login happens once per worker. Do not store per-test data on it, or tests start depending on each other.
reportSlowTests makes Playwright list test files that took longer than a threshold at the end of the run. You set max, the number of files to show, and threshold in milliseconds, for example { max: 5, threshold: 60000 }. It is a cheap way to find files worth splitting, because one slow file can hold up a worker or a whole shard.
15
What is a generic type parameter constraint, such as T extends object?
A constraint limits what types a generic can accept. function pick<T extends object, K extends keyof T>(obj: T, key: K) only accepts objects and keys that exist on them, so pick(user, 'emial') fails at compile time. In test helpers this catches typos in field names and keeps return types precise without using any.
16
How do you write data-driven API tests with many inputs?
Create one project per size in playwright.config, for example using devices['Pixel 7'], devices['iPad Mini'] and a desktop viewport, and point them at the same visual test files with testMatch or a tag. Because the project name is part of the baseline file name, each size keeps its own images automatically. This keeps the test code identical while covering responsive layouts.
19
What is the difference between click and dispatchEvent?
Record the current violations as a known baseline, for example by snapshotting violation ids and targets, and fail only on new ones. Fix the worst issues first, such as missing labels and contrast on key flows, and shrink the baseline every sprint. Make new pages and components meet zero violations from day one. Report the trend to the team so the debt is visible rather than silently ignored.
Assert immediately after the action that triggers it, using a web-first assertion like toBeVisible and toHaveText, which start checking at once. Do not add sleeps before the check. If the toast is still missed, control time with page.clock so it does not auto-hide, or verify the result through the data it confirms, such as the saved record.
testInfo is passed as the second argument to tests and hooks. It gives the test title, project name, retry number, status and output path. You can attach files, add annotations, change the timeout with testInfo.setTimeout, or skip conditionally. For example, attach extra logs only when testInfo.status differs from testInfo.expectedStatus.
Store them in the CI system's secret store and pass them as environment variables, never in the repository or config files. Read them through process.env and fail fast if they are missing. Use dedicated test accounts with limited rights. Avoid printing them in logs, and make sure traces and screenshots do not expose them in reports.
27
How do you test a page in dark mode or with reduced motion?
Set colorScheme: 'dark' or reducedMotion: 'reduce' in the context options or test.use. You can also switch during a test with page.emulateMedia({ colorScheme: 'dark' }). Then assert the right styles or take a screenshot comparison. Reduced motion also helps stability, because many apps skip animations when that preference is set.
28
Write a component test that checks an onSubmit callback receives the form data.
toPass retries a whole block of code, including several actions and assertions, until it runs without throwing. expect.poll retries only one function that returns a value. Use toPass for flows like 'click refresh, then check the status' that must be repeated together. It has no timeout by default, so always pass a timeout to avoid a hung test.
Each Playwright version expects specific browser builds. The official Playwright Docker image tagged v1.x.y-noble contains the browsers for that exact version. If package.json has a different version, tests fail because browsers are missing or mismatched. Pin both together and update them in the same pull request.
The test code runs in Node while the component runs in the browser. When you write mount(<Button title='Save' />), Playwright serialises the JSX and props and rebuilds them in the browser bundle. So props must be plain data such as strings, numbers, arrays and objects, plus callbacks, which Playwright proxies back to Node. Class instances, complex objects or live references cannot cross that boundary directly.
Open the dialog with a button and assert the dialog role is visible and focus moved inside it. Press Tab more times than there are controls and check with toBeFocused that focus never leaves the dialog. Press Escape, assert the dialog is hidden, and check that the opening button is focused again. Running the same test with Shift+Tab covers backward navigation as well.
36
How do you rerun only the tests that failed in a sharded CI run?
--last-failed works only on the machine that kept the .last-run.json file, so it does not help across shards. Instead collect the failed tests from the merged JSON report or the blob reports, then run them in a follow-up job by file and line or with --grep on their titles. Many teams simply rely on retries and treat any test needing a rerun as flaky.
An ARIA snapshot is a YAML description of the accessibility tree for a part of the page: roles, names and states such as checked or level. toMatchAriaSnapshot compares the live tree of a locator against that template, and partial templates or regular expressions can be used for changing text. It tests structure and semantics, so it survives styling changes that would break a pixel screenshot.
Tips to crack the Stripe Playwright Testing interview
Practise practical coding tasks like parsing data, calling APIs and fixing bugs in existing code, rather than only puzzle-style DSA.
Read Stripe's API documentation and try a test-mode integration to understand payment intents and webhooks.
Prepare examples of clear written communication, such as design docs or detailed reports, which Stripe culture strongly values.
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; Stripe interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Stripe Playwright Testing interview?
Candidates usually go through 5 stages: Recruiter screening; Technical phone screen (practical coding); Onsite coding and bug squash rounds; Integration or 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 Stripe Playwright Testing interview?
This practice set leans on Visual & Accessibility Testing (5), Locators and Assertions (5), Fixtures and Hooks (4), Framework Design and CI/CD (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Stripe interviewers ask you to walk through real work.
Are these the exact questions asked at Stripe?
No. These are curated practice questions that match the skills and difficulty usually tested in fintech interviews like Stripe's. They are not a leaked or verified list of past questions.
Where does Stripe hire Playwright Testing professionals in India?
Stripe has large teams in Bengaluru. Openings and locations change often, so check the Stripe careers page and filter by city and experience.
Playwright Testing questions for similar companies