Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Cashfree Payments hiring for Playwright Testing roles
Cashfree Payments is a Bengaluru-based payments company that provides payment gateway, payouts, recurring payments and verification APIs for businesses. Merchants use it to collect online payments, send bulk payouts and automate payment workflows. It is regulated as a payment aggregator and hires software engineers, quality engineers, data analysts, product managers and support roles.
For Playwright Testing roles, this Cashfree Payments practice set focuses most on Playwright Core (6), Fixtures and Hooks (6), JavaScript and TypeScript (5), Network Mocking (4). It has 5 easy, 33 medium, 2 hard questions, so you can start easy and work up to the harder ones.
Company type
Fintech
Headquarters
Bengaluru, India
Main India offices
Bengaluru
Cashfree Payments Playwright Testing interview process
Online coding assessment
Technical round 1 (DSA)
Technical round 2 (design or backend)
Hiring manager round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for Cashfree PaymentsStart 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.
Install the Playwright Test for VS Code extension. Open the Testing panel to see tests, then set a breakpoint in the test file and click Debug Test. Execution stops at the breakpoint with the browser open, so you can inspect variables. Turn on Show browser to watch runs, and use Pick locator or Record at cursor to add steps.
05
How do you take visual snapshots of each component state in component tests?
Mount the component once per state, for example default, disabled, loading and error, and call await expect(component).toHaveScreenshot() for each. Since only the component is on the page, images are small, stable and fast to review. Run them in the same Docker image as CI. This often replaces many full-page visual tests that break for unrelated reasons.
06
Where does Playwright store baseline screenshots and how are the files named?
By default baselines go into a folder next to the test file named after it, for example checkout.spec.ts-snapshots. The file name combines the name you give, the project name and the platform, such as home-chromium-linux.png. Because the browser and operating system are part of the name, each project keeps its own baseline. You commit these images to the repository so every run compares against the same files.
Locators are strict: an action such as click or fill throws a strict mode violation if the locator matches more than one element. This prevents a test from silently clicking the wrong item. Fix it by making the locator more specific with a name, filter or chaining. Methods like count(), all() or first() are allowed to work with many matches on purpose.
08
A feature is controlled by a flag served from a config API. How do you test both states?
Mock the config endpoint in a fixture option so each test chooses the flag value, for example featureFlags: { newCheckout: true }. Run the flow with the flag on and off and assert the different UI. Mocking avoids changing shared environment settings that would affect other testers. Also keep one test against the real config to catch wiring mistakes.
// 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
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.
17
Show a config with a setup project and a browser project that reuses its login.
page.clock lets tests control time. clock.install() fakes Date and timers, clock.setFixedTime() freezes the current date, and clock.fastForward() or runFor() moves time ahead. This is useful for session timeouts, countdowns, scheduled banners and date-based logic, without waiting real minutes. Install the clock before the page loads so the app uses fake time from the start.
19
How do you install and start a Playwright project?
Check that the route is registered before the request is sent, usually before goto. Compare the pattern with the real URL in the trace network tab, including query strings and host. Make sure a service worker is not handling the request, and set serviceWorkers: 'block' if it is. Also check that another handler is not matching first or the route was not removed.
21
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.
22
How do you handle authentication to avoid logging in every test?
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.
25
How do you run the same visual tests at mobile, tablet and desktop sizes?
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.
26
What is the difference between path parameters and query parameters?
Path parameters identify a specific resource and are part of the URL path, like /users/42. Query parameters filter, sort or paginate and follow a question mark, like /users?city=Delhi&page=2. In tests, check invalid path ids return 404, and that each query parameter changes results correctly, including invalid and missing values.
27
How do you handle date pickers and custom dropdowns?
Worker fixtures live across many tests, so any test that changes their data affects the next ones. Keep worker fixtures read-only, such as a connection or a reference catalogue. Move anything a test modifies into a test-scoped fixture that creates fresh data. If sharing is needed for speed, reset the relevant state in the test fixture before use.
Open the Network tab in the trace viewer, which lists every request in the test. Click one to see method, URL, status, request and response headers and bodies, and timing. Selecting an action filters the list to requests around that step. This shows whether a UI failure came from a failed API, a slow response or unexpected data.
32
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.
33
How do you change a mounted component's props during a test?
Call component.update with new JSX, for example await component.update(<Badge count={5} />). Playwright re-renders the same instance with the new props, so internal state is kept, just like a parent re-rendering it in the app. This lets you test effects that react to prop changes. To test fresh mounting behaviour instead, unmount and mount again.
34
How do you attach a screenshot or log to the report from inside a test?
threshold sets how different two pixels can be in colour, from 0 to 1, before they count as different; the default is 0.2. maxDiffPixels allows a fixed number of differing pixels, and maxDiffPixelRatio allows a fraction of the total image. Keep them tight so real regressions fail, and set them in the expect section of the config rather than loosening single tests one by one.
36
Promise.all vs Promise.allSettled vs Promise.race?
all waits for every promise and rejects on the first failure; allSettled waits for all and reports each outcome; race settles with the first one to finish.
37
How do you mock API calls made by a component in a component test?
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.
Load a .env file with a package like dotenv in playwright.config, then read process.env.BASE_URL. Values are string | undefined, so validate them early and throw a clear error if a required one is missing. Keep .env out of git and commit an .env.example instead. In CI, set the same names as secret variables.
40
What are the serial and parallel modes of test.describe.configure?
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.
Tips to crack the Cashfree Payments Playwright Testing interview
Revise backend fundamentals such as REST APIs, databases, transactions and idempotency, which matter greatly in payment systems.
Learn how payment gateways, UPI, refunds and payouts work at a high level to discuss product flows clearly.
Practise designing a simple payment or payout service, explaining failure handling, retries and reconciliation.
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; Cashfree Payments interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Cashfree Payments Playwright Testing interview?
Candidates usually go through 4 stages: Online coding assessment; Technical round 1 (DSA); Technical round 2 (design or backend); 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 Cashfree Payments Playwright Testing interview?
This practice set leans on Playwright Core (6), Fixtures and Hooks (6), JavaScript and TypeScript (5), Network Mocking (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Cashfree Payments interviewers ask you to walk through real work.
Are these the exact questions asked at Cashfree Payments?
No. These are curated practice questions that match the skills and difficulty usually tested in fintech interviews like Cashfree Payments's. They are not a leaked or verified list of past questions.
Where does Cashfree Payments hire Playwright Testing professionals in India?
Cashfree Payments has large teams in Bengaluru. Openings and locations change often, so check the Cashfree Payments careers page and filter by city and experience.
Playwright Testing questions for similar companies