Skip to content

Wells Fargo Playwright Testing Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About Wells Fargo hiring for Playwright Testing roles

Wells Fargo is a large US bank offering consumer banking, commercial banking, corporate and investment banking and wealth management. Its India centres in Hyderabad, Bengaluru and Chennai support technology, operations, analytics and risk. It hires for software engineers, testers, data analysts, data engineers and risk analysts.

For Playwright Testing roles, this Wells Fargo practice set focuses most on Network Mocking (7), Locators and Assertions (6), Fixtures and Hooks (6), API Testing (6). It has 8 easy, 27 medium, 5 hard questions, so you can start easy and work up to the harder ones.

Company type
Banking & finance
Headquarters
San Francisco, California, USA
Main India offices
Hyderabad, Bengaluru, Chennai

Wells Fargo Playwright Testing interview process

  1. Online assessment (aptitude + technical)
  2. Technical round
  3. Managerial round
  4. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for Wells FargoStart 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 filter a list of locators by text or by a child element?

Save to ▾
Show answer
// pick one product card from many const card = page.getByRole('listitem') .filter({ hasText: 'Wireless Mouse' }) .filter({ has: page.getByRole('button', { name: 'Add to cart' }) }); await card.getByRole('button', { name: 'Add to cart' }).click(); // hasNotText and hasNot exclude matches
02

What is testInfo and what can you do with it?

Save to ▾
Show answer
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.
03

What is the difference between workerIndex and parallelIndex?

Save to ▾
Show answer
workerIndex is a unique number for every worker process started during the run, so it keeps growing when a worker is restarted after a failure. parallelIndex is a slot number from 0 to workers minus 1, and a restarted worker reuses its slot. Use parallelIndex, also exposed as TEST_PARALLEL_INDEX, to pick a fixed test account or database per slot.
04

What are the serial and parallel modes of test.describe.configure?

Save to ▾
Show answer
test.describe.configure({ mode: 'serial' }) runs tests in order in one worker, and if one fails the rest are skipped. mode: 'parallel' lets tests in one file run across workers. Serial mode suits a true step-by-step flow, but it makes tests depend on each other, so prefer independent tests and use serial only when there is no alternative.
05

Test data is left behind when tests fail midway. How do you guarantee cleanup?

Save to ▾
Show answer
Create the data inside a fixture and delete it after await use(). Fixture teardown runs even when the test fails or times out, so cleanup is reliable. Avoid cleanup steps at the end of the test body, because they never run after a failed assertion. As a safety net, tag test data with a prefix and run a nightly cleanup job.
06

How does URL matching work in page.route?

Save to ▾
Show answer
The first argument can be a glob string, a regular expression or a function that receives a URL object. Globs like '**/api/users*' are simple but * does not cross slashes and ** does. Regex gives precise control over query strings. A predicate function suits complex rules, for example matching host plus a specific search parameter.
07

Write code to fill a login form using label-based locators.

Save to ▾
Show answer
test('login form', async ({ page }) => { await page.goto('/login'); await page.getByLabel('Email').fill('user@test.in'); await page.getByLabel('Password').fill('Pass@123'); await page.getByRole('button', { name: 'Sign in' }).click(); await expect(page).toHaveURL(/dashboard/); });
08

How do you share cookies between API login and UI?

Save to ▾
Show answer
Log in with request.post, call request.storageState(), and create a browser context using that state.
09

How do you attach a screenshot or log to the report from inside a test?

Save to ▾
Show answer
test('report', async ({ page }, testInfo) => { await page.goto('/reports'); await testInfo.attach('report page', { body: await page.screenshot(), contentType: 'image/png', }); await testInfo.attach('meta', { body: 'build 42', contentType: 'text/plain' }); });
10

Tests pass with one worker but fail with eight. How do you debug this?

Save to ▾
Show answer
This usually means tests share something: the same user account, the same records or a global server setting. Run the failing file with --workers=8 and --repeat-each to reproduce it. Look at which tests run at the same time in the report. Fix it by giving each test unique data, using workerIndex in names, or isolating shared settings per worker.
11

How do you assert the number of rows in a table?

Save to ▾
Show answer
// waits until exactly 5 data rows are rendered const rows = page.getByRole('table').getByRole('row'); await expect(rows).toHaveCount(6); // 1 header + 5 rows // avoid: expect(await rows.count()).toBe(6) // that reads once and does not retry
12

How do you send query parameters in an API request?

Save to ▾
Show answer
// GET /api/products?category=books&page=2 const res = await request.get('/api/products', { params: { category: 'books', page: 2 }, }); expect(res.ok()).toBeTruthy(); const body = await res.json(); expect(body.items.length).toBeGreaterThan(0);
13

A multi-select filter test passes even when an extra option stays selected. How do you tighten it?

Save to ▾
Show answer
The test probably checks only that the wanted options are selected, for example with a loop of toBeChecked or a contains check. Replace it with await expect(select).toHaveValues(['red', 'green']), which passes only when exactly those values are selected, and it retries until the timeout. For custom multi-select widgets, assert the full list of selected chips with toHaveText on the chip locator.
14

How do you test pagination or chained API calls?

Save to ▾
Show answer
Read the next page link or IDs from earlier responses, loop until done and assert counts and uniqueness; pass IDs between calls in the same test.
15

How do access modifiers help in page object classes?

Save to ▾
Show answer
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.
16

What are global setup and teardown?

Save to ▾
Show answer
Scripts that run once before or after the whole run, for seeding data, starting services or creating authentication state.
17

How does expect.poll work and when would you use it?

Save to ▾
Show answer
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.
18

How do you add, read and clear cookies in a browser context?

Save to ▾
Show answer
await context.addCookies([ { name: 'consent', value: 'yes', url: 'https://shop.example.test' }, ]); const cookies = await context.cookies(); expect(cookies.find((c) => c.name === 'consent')?.value).toBe('yes'); await context.clearCookies({ name: 'consent' });
19

Describe how you mentored junior engineers on your test framework.

Save to ▾
Show answer
Situation: three interns joined with little automation experience. Task: make them productive without lowering quality. Action: I ran short sessions on fixtures, locators and traces, paired with each of them on a first test, and gave detailed but kind review comments. Result: within a month they each shipped stable tests, and one later improved our reporting script.
20

What is UI mode and how is it different from --debug?

Save to ▾
Show answer
UI mode, opened with npx playwright test --ui, is a dashboard to run, filter and watch tests, with a trace-like timeline for each one and a watch mode that reruns on file changes. --debug opens the Inspector to step through a single run live. Use UI mode for daily development and --debug for stepping through a specific action.
21

How do you simulate a slow API to test a loading spinner?

Save to ▾
Show answer
await page.route('**/api/report', async route => { await new Promise(r => setTimeout(r, 3000)); await route.continue(); }); await page.getByRole('button', { name: 'Generate' }).click(); await expect(page.getByRole('progressbar')).toBeVisible(); await expect(page.getByRole('progressbar')).toBeHidden();
22

What are automatic fixtures?

Save to ▾
Show answer
A fixture defined with { auto: true } runs for every test even when the test does not ask for it. It is useful for cross-cutting work such as attaching console logs on failure, setting a feature flag or checking for leftover data. Keep auto fixtures light, because they add cost to every test in the suite.
23

How do you validate response headers?

Save to ▾
Show answer
Use response.headers() for an object of lower-cased header names, or headersArray() for duplicates. Assert content-type contains application/json, cache-control matches the policy, and security headers such as strict-transport-security are present. Also check that sensitive headers like server version are not exposed. Header checks catch configuration bugs that body checks miss.
24

A third-party analytics script makes tests slow and flaky. What do you do?

Save to ▾
Show answer
Block it in tests with context.route on its domain and route.abort, or fulfill it with an empty script. Analytics is not what you are testing, and blocking it removes delays and random network errors. If tracking events matter, write a few separate tests that capture the requests with waitForRequest and assert their parameters.
25

How do you change the default assertion timeout?

Save to ▾
Show answer
Web-first assertions wait 5 seconds by default. Change it globally in playwright.config with expect: { timeout: 10000 }, or for one assertion with await expect(locator).toBeVisible({ timeout: 15000 }). Raise it only for genuinely slow steps like report generation. Raising it everywhere hides performance problems and makes failing tests slower to report.
26

How do you organise tests with page object model in Playwright?

Save to ▾
Show answer
Create a class that takes a page, defines locators as properties and exposes action methods; instantiate it in a fixture for clean tests.
27

How do you test that the app retries a request that failed the first time?

Save to ▾
Show answer
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.
28

What is auto-waiting in Playwright?

Save to ▾
Show answer
Before acting, Playwright waits for the element to be attached, visible, stable, enabled and able to receive events — so manual waits are rarely needed.
29

How do retries work?

Save to ▾
Show answer
Set retries in the config or CLI and failed tests re-run in a fresh context, with trace recorded on first retry to diagnose flakiness.
30

How do you test how the UI handles a 500 error from the orders API?

Save to ▾
Show answer
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.
31

How do you run the same visual tests at mobile, tablet and desktop sizes?

Save to ▾
Show answer
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.
32

Why should you dispose an APIRequestContext?

Save to ▾
Show answer
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.
33

How do you work with iframes?

Save to ▾
Show answer
const frame = page.frameLocator('#payment-frame'); await frame.getByLabel('Card number').fill('4111 1111 1111 1111');
34

A fixture mocks every /api call, but one test needs a different response for /api/cart. How do you override it?

Save to ▾
Show answer
Register a new page.route for /api/cart inside that test. Handlers run in reverse order of registration, so the newer one runs first. Fulfil the cart request with the special data, and for anything else call route.fallback() so the request moves on to the fixture's general handler. This keeps the shared mock untouched and makes the override local and easy to read.
35

What is the difference between page, context and browser?

Save to ▾
Show answer
A browser is the engine instance; a context is an isolated session (cookies, storage); a page is a tab inside a context.
36

How do you wrap a component in a theme or router provider using hooksConfig?

Save to ▾
Show answer
// playwright/index.tsx import { beforeMount } from '@playwright/experimental-ct-react/hooks'; import { ThemeProvider } from '../src/theme'; export type HooksConfig = { theme?: 'light' | 'dark' }; beforeMount<HooksConfig>(async ({ App, hooksConfig }) => { return <ThemeProvider mode={hooksConfig?.theme ?? 'light'}><App /></ThemeProvider>; }); // in a test await mount(<Header />, { hooksConfig: { theme: 'dark' } });
37

Component tests fail because imports like @/utils cannot be resolved, though the app builds fine. How do you fix it?

Save to ▾
Show answer
The app uses a bundler alias that the component test bundle does not know. Add the same alias in ctViteConfig under resolve.alias, or reuse the project's Vite config by importing it. Also make sure tsconfig paths match, so editors and type checks agree. After that, clear the cache folder that the component bundler writes under playwright/.cache so the bundle rebuilds.
38

How do you test the difference between 401 and 403 responses?

Save to ▾
Show answer
401 Unauthorized means the caller is not authenticated, such as a missing or expired token. 403 Forbidden means the caller is known but lacks permission. Test 401 by calling without a token or with an invalid one. Test 403 by calling an admin endpoint with a normal user's token. Assert the status and that no data leaks in the body.
39

Describe a time you improved how test results were reported to the team or managers.

Save to ▾
Show answer
Situation: managers only heard pass or fail and could not tell flaky tests from real bugs. Task: make results useful. Action: I added a custom reporter that posted a short summary to our team chat with failures, flaky tests and a report link, and a weekly trend of flake rate. Result: flaky tests dropped by half in two months because owners could see them.
40

Mocked responses drift from the real API and tests pass while production breaks. How do you prevent this?

Save to ▾
Show answer
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.

Tips to crack the Wells Fargo Playwright Testing interview

  • Learn US banking concepts like mortgages, deposits and regulatory reporting, which many India teams support.
  • Revise SQL, Python and testing basics for technology and analytics roles, using banking data examples where possible.
  • Prepare examples about risk awareness and following controls, as compliance is a strong theme at Wells Fargo.
  • 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; Wells Fargo interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Wells Fargo Playwright Testing interview?

Candidates usually go through 4 stages: Online assessment (aptitude + technical); Technical round; Managerial round; HR 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 Wells Fargo Playwright Testing interview?

This practice set leans on Network Mocking (7), Locators and Assertions (6), Fixtures and Hooks (6), API Testing (6). Revise those first, then practise explaining one or two of your own projects end to end, because most Wells Fargo interviewers ask you to walk through real work.

Are these the exact questions asked at Wells Fargo?

No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like Wells Fargo's. They are not a leaked or verified list of past questions.

Where does Wells Fargo hire Playwright Testing professionals in India?

Wells Fargo has large teams in Hyderabad, Bengaluru, Chennai. Openings and locations change often, so check the Wells Fargo careers page and filter by city and experience.

Playwright Testing questions for similar companies