Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Course5 Intelligence hiring for Playwright Testing roles
Course5 Intelligence is a Mumbai-based analytics and AI company that offers market research, digital analytics, customer analytics and AI-driven insights to global brands. It works with clients in technology, retail, consumer goods, media and pharma. In India it hires data analysts, research analysts, data scientists and engineers who turn survey, digital and business data into insights.
For Playwright Testing roles, this Course5 Intelligence practice set focuses most on Network Mocking (5), JavaScript and TypeScript (5), Locators and Assertions (5), API Testing (4). It has 5 easy, 33 medium, 2 hard questions, so you can start easy and work up to the harder ones.
Company type
Analytics
Headquarters
Mumbai, India
Main India offices
Mumbai, Bengaluru
Course5 Intelligence Playwright Testing interview process
Online assessment (aptitude + analytics basics)
Technical interview
Case or managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for Course5 IntelligenceStart 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
A third-party analytics script makes tests slow and flaky. What do you do?
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.
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.
03
CI runners have 2 CPU cores and workers is set to 8. Tests start timing out randomly. Why?
Eight browsers compete for two cores and limited memory, so pages render slowly, actions hit timeouts and the app under test may also be overloaded. More workers than cores rarely helps. Set workers to match the runner, such as 2, and scale out with shards on more machines instead. Watch CPU and memory metrics in CI to confirm.
04
What is the difference between a type annotation and a type assertion with as?
A type annotation such as const user: User = data asks the compiler to check that the value really fits User. A type assertion such as data as User tells the compiler to trust you, so mismatches are not reported. In test code assertions are risky on API responses, because a wrong field passes compilation and fails later. Prefer annotations, type guards or runtime schema validation.
05
Write a typed helper that retries an async function a few times.
Situation: our regression suite took 55 minutes, so developers skipped it. Task: bring it under 15. Action: I removed shared test data so fullyParallel could be turned on, split the three slowest files, and ran four shards with blob reports merged into one HTML report. Result: the suite finished in 12 minutes and it became a required check on every pull request.
07
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.
08
How do you test geolocation, permissions and time zones?
The best fix is to remove the shared resource, for example by giving each test its own tenant or user whose settings it can change. If that is impossible, put those tests in one file with test.describe.configure({ mode: 'serial' }), or in a separate project that runs with one worker after the main project. Document why, so the exception does not quietly spread.
It reruns only the tests that failed in the previous run, using the results stored in the test-results folder. It saves time while you fix failures locally because you do not rerun the whole suite. Combine it with --headed or --debug to investigate. Run the full suite again before pushing to confirm nothing else broke.
11
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.
12
What is the difference between the request fixture and request.newContext()?
The request fixture is a ready APIRequestContext that uses the config's baseURL and extraHTTPHeaders and is cleaned up automatically per test. playwright.request.newContext() creates your own context with custom settings, such as a different base URL or auth token, for example in a worker fixture. You must dispose a manually created context yourself.
13
Why are screenshot baselines specific to browser and operating system?
Each browser engine lays out and paints text, shadows and form controls slightly differently, and each operating system has its own fonts and smoothing. A Chromium image on Linux will rarely match WebKit on macOS pixel for pixel. That is why Playwright includes project and platform in the file name and why teams fix one rendering environment for baselines.
14
How do you check a checkbox and verify it is checked?
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.
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.
19
Component and end-to-end tests run together and slow down every commit. How do you separate them?
Give them separate configs, such as playwright-ct.config.ts with its own testDir for component specs and playwright.config.ts for end-to-end tests, because component tests also need the bundler options and framework test import. In CI, run component tests on every commit as a fast job and end-to-end tests later or in parallel. Shared settings like reporters can live in a common module both configs import.
20
How do you wrap a component in a theme or router provider using hooksConfig?
Use a web-first negative assertion such as await expect(banner).toBeHidden() or not.toBeVisible(); they pass as soon as the element is absent, so they do not wait the full timeout. The real problem is timing: assert after a positive signal, such as the success message appearing, otherwise the banner may simply not have rendered yet and the check passes too early.
23
Why turn on strict mode in tsconfig for a test project?
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.
test.skip skips a test, optionally with a condition such as browserName === 'webkit'. test.fixme marks a test as broken and does not run it, so it is visible in reports as work to do. test.fail marks a test as expected to fail and reports an error if it unexpectedly passes, which is useful while a known bug is open.
25
What are nth(), first() and last(), and why are they risky?
They pick one element by position from a locator that matches many. They are fine when order is truly meaningful, such as the first search result. They are risky when order depends on data, sorting or rendering speed, because the test may silently act on the wrong element. Prefer filtering by text or a child element that identifies the item.
26
How do you simulate a slow API to test a loading spinner?
An idempotent method gives the same result when repeated. GET, PUT and DELETE are idempotent, POST is not. This matters for retries: a retried PUT is safe, but a retried POST may create duplicates. Test that repeating a PUT leaves one updated record and that repeating DELETE returns a sensible status such as 404 or 204.
31
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.
32
What is an ARIA snapshot and how does toMatchAriaSnapshot work?
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.
33
How do you handle token refresh in long API test runs?
Use retries in CI so one-off failures do not block merges, but treat any test marked flaky in the report as a defect. Track flaky tests on a dashboard, quarantine repeat offenders with a tag and an owner, and set a deadline to fix or delete them. Never retry without investigating, or real intermittent bugs will be missed.
36
How can you apply extra CSS only while a screenshot is taken?
Pass the stylePath option to toHaveScreenshot or set it in the expect.toHaveScreenshot section of the config. The stylesheet is injected just for the capture, so you can hide scrollbars, freeze a carousel, or set visibility hidden on dynamic widgets without changing the app. It is cleaner than adding test-only classes and also works when a mask box would cover too much of the layout.
37
What do maxDiffPixels, maxDiffPixelRatio and threshold control in a screenshot comparison?
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.
38
How do you publish the Playwright HTML report from a CI pipeline?
Keep the html reporter in the config. After the test step, add an upload-artifact step that runs even when tests fail, using a condition like always(), and upload the playwright-report folder with a retention period. Team members download and open it with npx playwright show-report. Some teams also publish it to static hosting for direct links.
39
Tell me about a time you introduced component tests to a frontend team.
Situation: our end-to-end suite took 40 minutes and most failures were in form validation. Task: speed up feedback. Action: I set up Playwright component tests for the form library, wrote ten examples and a short guide, and paired with two developers on their first tests. Result: validation checks moved to component level, the end-to-end suite dropped to 25 minutes and developers began writing component tests themselves.
40
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.
Tips to crack the Course5 Intelligence Playwright Testing interview
Revise Excel, SQL and a visualisation tool such as Power BI or Tableau, which are widely used in analytics roles.
Learn basic market research concepts like surveys, sampling and segmentation if you apply for research and insights positions.
Practise presenting a short insight story from a dataset, explaining what the numbers mean for a business decision.
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; Course5 Intelligence interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Course5 Intelligence Playwright Testing interview?
Candidates usually go through 4 stages: Online assessment (aptitude + analytics basics); Technical interview; Case or 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 Course5 Intelligence Playwright Testing interview?
This practice set leans on Network Mocking (5), JavaScript and TypeScript (5), Locators and Assertions (5), API Testing (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Course5 Intelligence interviewers ask you to walk through real work.
Are these the exact questions asked at Course5 Intelligence?
No. These are curated practice questions that match the skills and difficulty usually tested in analytics interviews like Course5 Intelligence's. They are not a leaked or verified list of past questions.
Where does Course5 Intelligence hire Playwright Testing professionals in India?
Course5 Intelligence has large teams in Mumbai, Bengaluru. Openings and locations change often, so check the Course5 Intelligence careers page and filter by city and experience.
Playwright Testing questions for similar companies