Skip to content

Samsung Playwright Testing Interview Questions & Answers

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

About Samsung hiring for Playwright Testing roles

Samsung Electronics makes smartphones, consumer electronics, semiconductors and home appliances. Its India R&D institutes in Bengaluru, Noida and Delhi work on mobile software, AI, camera, connectivity and data. It hires for software engineers, test engineers and data professionals, with campus hiring known for coding-focused tests.

For Playwright Testing roles, this Samsung practice set focuses most on API Testing (6), Framework Design and CI/CD (6), Network Mocking (5), Component Testing (4). It has 1 easy, 34 medium, 5 hard questions, so you can start easy and work up to the harder ones.

Company type
Hardware & semiconductors
Headquarters
Suwon, South Korea
Main India offices
Bengaluru, Noida, Delhi

Samsung Playwright Testing interview process

  1. Online coding test (Samsung competency test)
  2. Technical interview 1
  3. Technical interview 2
  4. HR round

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

Solved for SamsungStart 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

interface vs type in TypeScript?

Save to ▾
Show answer
Both describe object shapes. Interfaces can be extended and merged; type aliases can also describe unions and primitives. Use interfaces for page or test-data shapes, types for unions.
02

How do you mock an API response?

Save to ▾
Show answer
await page.route('**/api/users', route => route.fulfill({ status: 200, json: [{ id: 1, name: 'Test' }] }) );
03

How do you reproduce a flaky test locally?

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

How do you reuse login state across tests?

Save to ▾
Show answer
Log in once in global setup, save storageState to a JSON file and set use.storageState in the config so every test starts logged in.
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 do you test API error scenarios?

Save to ▾
Show answer
Send invalid payloads or missing auth and assert 400, 401 or 404 codes and the error message bodies.
07

How do you pass slots and listen to events in a Vue component test?

Save to ▾
Show answer
With the Vue package you can mount with an options object: mount(Button, { props: { label: 'Save' }, slots: { default: 'Click me' }, on: { click: handler } }). The on map receives emitted events, so you can push payloads into an array and assert on them. JSX syntax is also supported if the project is configured for it.
08

When should you choose a component test over an end-to-end test?

Save to ▾
Show answer
Choose a component test when the behaviour lives inside one component: validation messages, disabled states, sorting in a table, keyboard handling in a dropdown or rendering of edge-case data. These are slow and awkward to reach through full flows. Choose end-to-end when the risk is in integration, such as routing, authentication or data saved on the server.
09

How do you take visual snapshots of each component state in component tests?

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

What does eslint-plugin-playwright help with?

Save to ▾
Show answer
It is a lint plugin with rules for common Playwright mistakes, such as missing await on assertions, leftover test.only or page.pause, forced clicks, fixed waits with waitForTimeout and element handles instead of locators. Running it in pull requests stops bad patterns before review. Teams usually enable the recommended rule set and add a few stricter rules over time.
11

How do you handle multiple tabs or pop-ups?

Save to ▾
Show answer
Wait for the popup event with const [popup] = await Promise.all([page.waitForEvent('popup'), page.click('a')]), then interact with popup.
12

What reporters does Playwright provide?

Save to ▾
Show answer
List, dot, line, HTML, JSON and JUnit reporters, plus integrations such as Allure, configurable per environment.
13

A test must confirm that an error banner does not appear, but it always waits the full timeout. How do you fix it?

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

What is a fixture option and how do you define one?

Save to ▾
Show answer
An option is a fixture whose value is configured rather than computed, declared with { option: true } and a default, for example defaultUser: ['standard', { option: true }]. Projects or test.use can override it, so one suite can run as admin in one project and as a viewer in another. Other fixtures can read the option to decide what to set up.
15

Design a Playwright framework for a 500-test suite.

Save to ▾
Show answer
TypeScript + POM + custom fixtures, environment configs, API helpers for test data, tags like @smoke, sharding across CI machines, retries with traces, HTML/Allure reports, lint and review rules.
16

Tell me about a time you introduced component tests to a frontend team.

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

How do you test file upload via API?

Save to ▾
Show answer
Use request.post with multipart: { file: { name, mimeType, buffer } } and assert the response and stored file details.
18

How do you run Playwright in GitHub Actions?

Save to ▾
Show answer
Workflow: checkout → setup-node → npm ci → npx playwright install --with-deps → npx playwright test → upload playwright-report as an artifact.
19

How do you assert that a request was sent with the correct payload?

Save to ▾
Show answer
const reqPromise = page.waitForRequest(r => r.url().endsWith('/api/orders') && r.method() === 'POST' ); await page.getByRole('button', { name: 'Place order' }).click(); const req = await reqPromise; expect(req.postDataJSON()).toMatchObject({ qty: 2, sku: 'MOU-01' });
20

What do maxDiffPixels, maxDiffPixelRatio and threshold control in a screenshot comparison?

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

What are higher-order functions?

Save to ▾
Show answer
Functions that take other functions as arguments or return them, such as map, filter and reduce, or a helper that wraps retry logic around a test step.
22

Write a test that updates a user with PUT and verifies the change.

Save to ▾
Show answer
test('update user', async ({ request }) => { const res = await request.put('/api/users/12', { data: { name: 'Neha', city: 'Jaipur' }, }); expect(res.status()).toBe(200); const get = await request.get('/api/users/12'); expect(await get.json()).toMatchObject({ name: 'Neha', city: 'Jaipur' }); });
23

Locator vs ElementHandle?

Save to ▾
Show answer
A Locator is lazy, re-resolved on every action and auto-waits (recommended). An ElementHandle points to one DOM node and can go stale.
24

The app polls a status endpoint every few seconds. How do you test the change from Pending to Done?

Save to ▾
Show answer
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 add or change request headers for only some requests?

Save to ▾
Show answer
Register a route for the matching URLs and call route.continue({ headers: { ...route.request().headers(), 'x-test-mode': 'true' } }). Other requests are untouched. For headers on every request, use extraHTTPHeaders in the config instead. This is useful for feature toggles, tenant ids or bypass tokens that only certain endpoints accept.
26

A locator matches three Delete buttons and the test fails with a strict mode violation. How do you fix it?

Save to ▾
Show answer
First scope the locator to the item you mean, for example the row that contains the user's name: page.getByRole('row', { name: 'Ravi Kumar' }).getByRole('button', { name: 'Delete' }). Do not reach for first() or nth() as a quick fix, because the order can change and the test may delete the wrong record. Scoping by meaningful context is stable and readable.
27

What is APIRequestContext?

Save to ▾
Show answer
The object behind the request fixture that holds base URL, headers and cookies, and can share cookies with a browser context.
28

Show a config with a setup project and a browser project that reuses its login.

Save to ▾
Show answer
projects: [ { name: 'setup', testMatch: /auth\.setup\.ts/ }, { name: 'chromium', use: { ...devices['Desktop Chrome'], storageState: '.auth/user.json' }, dependencies: ['setup'], }, ],
29

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.
30

Tell me about a time mocking helped you test a hard edge case.

Save to ▾
Show answer
Situation: we could not reproduce a bug where the cart broke when the stock API returned zero for one item. Task: cover it with a test. Action: I mocked only the stock endpoint with route.fetch and changed one item's quantity, then asserted the out-of-stock label. Result: the bug was fixed and the test now protects that case on every run.
31

What is hoisting?

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

How do test.slow() and longer timeouts help or hurt debugging?

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

What is the difference between click and dispatchEvent?

Save to ▾
Show answer
click simulates a real user click with actionability checks; dispatchEvent fires a DOM event directly without those checks.
34

How do you test file downloads and verify their content?

Save to ▾
Show answer
Capture the download event, save it with download.saveAs, then read the file in Node and assert on name, size or content.
35

How would you build a flaky-test dashboard from Playwright results?

Save to ▾
Show answer
Write a custom reporter or parse the JSON report after each CI run, and store per test: id, status, retry count, duration, branch and commit. A test that passed after a retry counts as flaky. Aggregate over the last few hundred runs to rank tests by flake rate and duration, and show trends. Use it to assign owners and quarantine tests above an agreed threshold.
36

How do you write data-driven API tests with many inputs?

Save to ▾
Show answer
const cases = [ { email: '', status: 400 }, { email: 'bad', status: 400 }, { email: 'ok@test.in', status: 201 }, ]; for (const c of cases) { test(`signup with '${c.email}'`, async ({ request }) => { const res = await request.post('/api/signup', { data: { email: c.email } }); expect(res.status()).toBe(c.status); }); }
37

How do you inspect a specific network request in the trace viewer?

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

An axe scan reports 40 violations on a legacy page. How do you add accessibility checks without blocking every build?

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

Describe a time a test passed but the feature was actually broken.

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

A worker-scoped fixture holds shared data and some tests see stale values. How do you fix it?

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

Tips to crack the Samsung Playwright Testing interview

  • Practise Samsung-style coding problems based on BFS, DFS, backtracking and simulation without using built-in libraries.
  • Revise C, C++ or Java fundamentals deeply along with operating systems and data structures.
  • Read about Samsung R&D work in India on Galaxy devices, One UI and on-device AI.
  • 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; Samsung interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Samsung Playwright Testing interview?

Candidates usually go through 4 stages: Online coding test (Samsung competency test); Technical interview 1; Technical interview 2; 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 Samsung Playwright Testing interview?

This practice set leans on API Testing (6), Framework Design and CI/CD (6), Network Mocking (5), Component Testing (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Samsung interviewers ask you to walk through real work.

Are these the exact questions asked at Samsung?

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

Where does Samsung hire Playwright Testing professionals in India?

Samsung has large teams in Bengaluru, Noida, Delhi. Openings and locations change often, so check the Samsung careers page and filter by city and experience.

Playwright Testing questions for similar companies