QA Automation Engineer (SDET) interview questions

Frameworks, patterns, locators, waits, API automation, CI and flaky tests for QA automation engineers and SDETs.

Frameworks and patternsLocators and waitsAPI automationCI/CD
  1. 01

    What is the Page Object pattern and why use it?

    +

    Each page is a class with its elements and actions. Tests call page methods instead of selectors, so UI changes are fixed in one place and tests read like scenarios.

  2. 02

    Which locators do you use and why?

    +

    Stable attributes first: data-testid, roles and accessible names (getByRole in Playwright), ids. CSS for simple cases, XPath only when there's no other way. Avoid locators tied to layout or changing text.

  3. 03

    Explicit vs. implicit waits?

    +

    An implicit wait is a global timeout for finding elements. An explicit wait targets a specific condition (visible, clickable, response received). Explicit waits are more reliable; sleep is an anti-pattern. Playwright auto-waits before actions.

  4. 04

    Playwright or Selenium?

    +

    Playwright is modern and fast, with auto-waiting, isolated browser contexts, network interception and tracing. Selenium is the W3C WebDriver standard with wider language support and legacy infrastructure (Grid, cloud providers). The choice depends on the team's stack and needs.

  5. 05

    How do you deal with flaky tests?

    +

    Find the cause from traces and screenshots: timing, data or order dependency, an unstable environment. Fixes: condition-based waits, data isolation, mocking external services. Quarantine flaky tests with a mandatory fix instead of endless retries.

  6. 06

    How do you manage test data in automated tests?

    +

    Create it through the API in fixtures, unique data per test, cleanup in teardown, data factories, and no dependency on execution order.

  7. 07

    How do you automate API tests?

    +

    An HTTP client (requests, axios, REST Assured), assertions on status, schema (JSON Schema) and values, parameterized negative cases, authentication in fixtures, running in CI. API tests are faster and more stable than UI tests.

  8. 08

    How do you set up automated tests in CI?

    +

    Run on every pull request and on a schedule, parallelize and shard, keep artifacts (report, screenshots, traces, video on failure), send notifications, and split suites: smoke on every commit, full regression nightly.

  9. 09

    What are fixtures in pytest?

    +

    Setup and teardown functions with a scope of function, class, module or session. They provide resources to tests through parameters, can be parameterized and can depend on each other.

  10. 10

    How do you decide what to automate?

    +

    Stable, repetitive, critical scenarios: smoke, regression, APIs, data-driven checks. Weigh how often it runs, the cost of running it manually and the cost of maintaining the automated test.

  11. 11

    How do you test desktop applications?

    +

    Through UI Automation (pywinauto, WinAppDriver, FlaUI): find elements by accessibility-tree properties. Image recognition only as a last resort for elements missing from the tree. Data isolation and a reliable app start are key.

How to prepare

Don't memorize answers word for word: the interviewer is checking how you think. For every question, prepare an example from your own experience using the STAR method — situation, task, action, result. Expect behavioral questions too: a conflict with a developer, a missed bug, a tight deadline.