Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Uber hiring for Playwright Testing roles
Uber operates ride-hailing, food delivery through Uber Eats, and freight platforms in many countries. Its Bengaluru and Hyderabad tech centres contribute to global products in maps, payments, marketplace and safety. It hires in India for software engineers, data scientists, data engineers and analysts working on pricing, ETAs, marketplace efficiency and operations.
For Playwright Testing roles, this Uber practice set focuses most on Network Mocking (6), API Testing (5), Locators and Assertions (5), JavaScript and TypeScript (5). It has 29 medium, 11 hard questions, so you can start easy and work up to the harder ones.
Company type
Product
Headquarters
San Francisco, California, USA
Main India offices
Bengaluru, Hyderabad, Gurugram
Uber Playwright Testing interview process
Online coding assessment
Technical phone screen
Coding and problem-solving rounds
System design or analytics case round
Hiring manager round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for UberStart 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 handle token refresh in long API test runs?
Newer Playwright versions provide a router fixture in component tests. You call router.route with a URL pattern and fulfil it with test data, much like page.route, and it can also use mock handlers written for Mock Service Worker. Alternatively, inject a fake data client through props or a provider in hooksConfig. Mocking keeps component tests fast and independent of any backend.
Scanners like axe find rule-based problems such as missing labels, bad contrast or invalid ARIA, which is roughly a third to a half of real issues. They cannot judge whether alt text is meaningful, whether focus order makes sense, whether error messages are understandable, or whether a screen reader user can actually finish the task. So automated scans are combined with keyboard tests and periodic manual checks with screen readers.
04
Describe a time a test passed but the feature was actually broken.
Situation: a checkout test passed, but users saw a blank order summary. Task: find why. Action: I found the test only asserted that the summary container was visible, not its contents. I added assertions on item names, totals and the order id. Result: the test caught the regression, and I reviewed other tests for similar weak assertions.
05
Mocked responses drift from the real API and tests pass while production breaks. How do you prevent this?
Generate mock data from the API schema or real recorded responses instead of hand-writing it. Validate mocks against the OpenAPI schema in a unit test. Add contract tests on the backend side and re-record HAR files on a schedule. Keep a few unmocked end-to-end tests that run after each deploy. Treat mock files as code with owners and reviews.
Run it many times in isolation: npx playwright test cart.spec.ts -g 'apply coupon' --repeat-each=30 --workers=4 --trace=on. Repeating it with several workers creates the timing pressure CI has. Add --retries=0 so failures are not hidden. Once it fails, open the trace for that run and compare it with a passing run.
Make each test own its data. Create the record inside the test or a fixture with a unique name, such as one using a timestamp or the worker index, and delete it in teardown. Avoid shared seed records for anything that gets modified. Shared read-only reference data is fine. This also lets tests run fully in parallel.
10
Ten engineers write tests and quality varies a lot. How do you keep the framework consistent?
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.
11
Describe a time a broken fixture failed many tests at once and how you handled it.
Situation: one morning 300 tests failed in CI. Task: restore the pipeline quickly. Action: the trace showed every test failing inside an auth fixture after a login API change, so I fixed the fixture, added a dedicated setup test that fails fast with a clear message, and alerted the team. Result: the pipeline recovered within an hour and similar outages became easy to spot.
12
How do you test that the app retries a request that failed the first time?
Register a route with a counter: on the first call use route.fulfill with status 503, and on later calls fulfil with a success body. Perform the action, then assert the UI shows the final data and the counter equals 2. You can also check that no error message flashed. This proves the retry logic works without waiting for a real outage.
13
How do you mock one GraphQL query when all calls go to /graphql?
Define an interface for the payload, cast or validate the parsed JSON to it (for example with zod), and use that type in assertions to catch shape changes.
15
How does expect.poll work and when would you use it?
expect.poll calls a function again and again until the value it returns passes the matcher or the timeout runs out. It is useful for values that are not locators, such as an API status or a database count. Example: await expect.poll(async () => (await request.get('/api/job/7')).status()).toBe(200). You can tune the intervals and the timeout.
16
How do you organise tests with page object model in Playwright?
strict enables checks such as strictNullChecks and noImplicitAny. They catch bugs like using a value that may be undefined, missing parameters or wrong property names before tests run. In a large suite this saves debugging time and makes page objects safer to refactor. Pair it with the no-floating-promises lint rule to catch missing awaits.
19
How do you run one group of tests serially while the rest of the suite runs in parallel?
Put the group in its own project with fullyParallel: false and limit it to one worker, which recent versions allow with a workers setting on the project, or run it in a separate CI step with --project=serial --workers=1. Inside a file, test.describe.configure({ mode: 'serial' }) keeps order. Use project dependencies if the group must run after the parallel tests.
20
Write a GitHub Actions job that runs the suite in four shards.
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.
24
Your test clicks a button before the page's JavaScript has attached its handler, so nothing happens. What do you do?
This is a hydration problem: the button is visible and enabled but not yet interactive. Wait for a signal that the app is ready, such as a loaded data request or a visible element that only appears after hydration, then click. A better fix is to report it to developers, because real users hit the same issue. Avoid fixed waitForTimeout calls.
25
The app polls a status endpoint every few seconds. How do you test the change from Pending to Done?
Mock the endpoint with a counter: return Pending for the first two calls and Done after that. Then assert the UI shows Pending and later Done using web-first assertions with a suitable timeout. You can also use page.clock to speed up the polling interval instead of waiting real seconds. This makes a slow real-world process quick and deterministic.
26
How do you test geolocation, permissions and time zones?
--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.
28
How do you create test data through the API before a UI test?
In a fixture or beforeEach, call the API (request.post) to create the user or order, use it in the UI test, then delete it in teardown. It is faster and more reliable than creating data through the UI.
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.
The action runs without waiting, so the next step may run first — causing flaky failures or 'Target closed' errors. The @typescript-eslint/no-floating-promises rule catches it.
32
How do you capture browser console messages and page errors?
Listen with page.on('console', msg => ...) for console.log, warnings and errors, and page.on('pageerror', err => ...) for uncaught exceptions. Collect them in an array and attach them to the report on failure. Traces also show console output. Uncaught page errors often explain why a button did nothing or a page stayed blank.
33
What does the JSON reporter output and how would you use it?
The JSON reporter writes the full suite tree with every test, its status, retries, duration, errors and attachment paths into one file. Teams parse it in scripts to post a summary to chat, to collect flaky tests that passed on retry, or to push results to a database for trends. Set outputFile so the JSON does not mix with console output.
34
How do you simulate a slow API to test a loading spinner?
Never trust status alone. Assert the body structure, for example that error is absent and data has the expected fields, ideally with a schema check. Report the issue, because returning 200 for errors breaks clients and monitoring. Add a helper that validates both status and body shape so every test checks it consistently.
36
Write a visual assertion that masks a live clock and an ad banner.
private and protected hide internal locators and helper steps, so tests can only call meaningful public methods such as login or addToCart. This keeps tests readable and lets you change internals without breaking callers. readonly on the page field prevents it from being replaced. TypeScript enforces these at compile time only, not at runtime.
39
How would you handle a very flaky element that appears after an animation?
forEach does not wait for async callbacks, so it starts each callback and returns at once. The test may finish before the assertions run, or their errors are lost. Use for...of with await to run steps in order, or Promise.all with map when the steps can safely run in parallel. A lint rule can flag this pattern.
Tips to crack the Uber Playwright Testing interview
Practise case questions on marketplace balance, such as how surge pricing or driver incentives affect supply and demand.
Revise SQL and statistics for analyst roles, including cohort analysis and experiment design for app features.
Study graph and geospatial problems like shortest paths, which connect naturally to Uber's mapping and dispatch systems.
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; Uber interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Uber Playwright Testing interview?
Candidates usually go through 5 stages: Online coding assessment; Technical phone screen; Coding and problem-solving rounds; System design or analytics case round; Hiring manager 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 Uber Playwright Testing interview?
This practice set leans on Network Mocking (6), API Testing (5), Locators and Assertions (5), JavaScript and TypeScript (5). Revise those first, then practise explaining one or two of your own projects end to end, because most Uber interviewers ask you to walk through real work.
Are these the exact questions asked at Uber?
No. These are curated practice questions that match the skills and difficulty usually tested in product interviews like Uber's. They are not a leaked or verified list of past questions.
Where does Uber hire Playwright Testing professionals in India?
Uber has large teams in Bengaluru, Hyderabad, Gurugram. Openings and locations change often, so check the Uber careers page and filter by city and experience.
Playwright Testing questions for similar companies