---
title: Knowledge check | Selenium & Playwright Interview Questions
description: 'Ten questions in the style of a technical screen: each one has a plausible
  wrong answer that interviewers hear often. 1. A Selenium test sets an implicit…'
source_url:
  html: https://testingbot.com/resources/courses/selenium-interview-questions/knowledge-check
  md: https://testingbot.com/resources/courses/selenium-interview-questions/knowledge-check.md
---

Course

[Selenium & Playwright Interview Questions](https://testingbot.com/resources/courses/selenium-interview-questions)

Chapter 8 of 8

1. [1 Selenium Interview Questions](https://testingbot.com/resources/courses/selenium-interview-questions)
2. [2 Advanced Selenium Interview Questions](https://testingbot.com/resources/courses/selenium-interview-questions/advanced-selenium-interview-questions)
3. [3 Playwright Interview Questions](https://testingbot.com/resources/courses/selenium-interview-questions/playwright-interview-questions)
4. [4 Cypress Interview Questions](https://testingbot.com/resources/courses/selenium-interview-questions/cypress-interview-questions)
5. [5 Appium Interview Questions](https://testingbot.com/resources/courses/selenium-interview-questions/appium-interview-questions)
6. [6 TestNG Interview Questions](https://testingbot.com/resources/courses/selenium-interview-questions/testng-interview-questions)
7. [7 Scenario and Coding Questions](https://testingbot.com/resources/courses/selenium-interview-questions/scenario-and-coding-questions)
8. [8 Knowledge check](https://testingbot.com/resources/courses/selenium-interview-questions/knowledge-check)

[Exit course](https://testingbot.com/resources/courses)

 Chapter 8 of 8 Intermediate 5 min read Updated Nov 2026 

# Knowledge check

Ten questions in the style of a technical screen: each one has a plausible wrong answer that interviewers hear often.

1. A Selenium test sets an implicit wait of 10 seconds and also uses a 10-second `WebDriverWait`. What does the Selenium documentation say about this?

 It is recommended: the implicit wait covers finding, the explicit wait covers state. Avoid it: mixing the two can produce unpredictable wait times. The explicit wait silently disables the implicit wait.

Mixing implicit and explicit waits can stack timeouts in unexpected ways. Pick explicit waits and leave the implicit wait at zero.

2. Your team runs 200 tests one after another with a single-threaded runner. You point them at a Selenium Grid with 50 free slots. What happens to the run time?

 It drops to roughly a fiftieth. It drops, but only by half because of network overhead. Roughly nothing changes: the runner still starts one session at a time.

Grid provides capacity; parallelism comes from the test runner. Without parallel execution configured, only one slot is ever used.

3. Which Playwright line is likely to be flaky when the cart count updates asynchronously?

 `expect(await cart.textContent()).toBe('3')` `await expect(cart).toHaveText('3')` Both are equally reliable because Playwright auto-waits.

The first form reads the text once and compares it. Only the web-first assertion retries until the text matches or the timeout expires.

4. A Playwright click fails with a strict mode violation. What does that mean?

 The element was not visible or enabled before the timeout. The locator matched more than one element, so Playwright refused to guess. The page violated a Content Security Policy.

Locators are strict: an action on a locator that resolves to several elements throws. Narrow it by scoping to a container or filtering, rather than reaching for `.first()` by reflex.

5. You shard a Playwright suite across four CI jobs. How do you get one HTML report?

 Each shard writes the HTML report into the same folder; the last one wins. Sharding cannot produce a combined report. Use the blob reporter on each shard, then `npx playwright merge-reports`.

Blob reports contain all the run information needed to merge. A final job collects them into one folder and merges them into an HTML report.

6. In Cypress, why does `const el = cy.get('button'); el.click()` not behave like Selenium code?

 Cypress commands are queued and yield their subject later; `cy.get` does not return the element. `cy.get` returns a Promise that must be awaited. Cypress only allows one variable per test.

Commands are enqueued and run later; you work with yielded values in `.then()` or through aliases. Cypress chains are not Promises, and `await` breaks the queue.

7. A Cypress 16 upgrade breaks tests that call `Cypress.env('apiKey')`. What is the right replacement for a secret?

 `Cypress.expose('apiKey')` `cy.env(['apiKey']).then(({ apiKey }) => ...)` `cy.exec('echo $API_KEY')`

`cy.env()` only hands over the values you ask for and keeps secrets out of browser state. `Cypress.expose()` is for public values, and `cy.exec()` was removed in Cypress 16.

8. After moving to Appium 3, a test that used `--allow-insecure=adb_shell` can no longer run shell commands. What fixed it?

 Downgrading Node.js to 18. Adding `appium:adbShell: true` to the capabilities. Scoping the flag to the driver: `--allow-insecure=uiautomator2:adb_shell`.

Appium 3 requires insecure feature flags to carry a driver prefix. It also needs Node.js 20.19 or newer, so downgrading Node would stop the server from starting.

9. Why is XPath a last-resort locator in Appium?

 The driver must serialise the whole UI hierarchy to XML and evaluate against it, which is slow on complex screens. Appium 3 removed XPath support. XPath only works on Android.

XPath still works on both platforms, but accessibility IDs and native queries (UiAutomator, predicate strings, class chains) avoid the expensive hierarchy dump.

10. A TestNG suite uses `parallel="methods"` and a `static WebDriver driver` in a base class. What do you expect?

 Everything works, but each test is slower. Tests act on and quit each other's browsers, failing at random. TestNG detects the static field and runs the methods sequentially.

All threads share one field, so they overwrite and quit each other's sessions. Keep the driver in a `ThreadLocal` or create it per test method.

Check answers

For hands-on practice with the frameworks behind these questions, continue with the [Playwright course](https://testingbot.com/resources/courses/playwright) or [Selenium with TestNG](https://testingbot.com/resources/courses/selenium-testng); mobile candidates can follow the [Appium with WebdriverIO course](https://testingbot.com/resources/courses/appium-webdriverio).

[Previous · Chapter 7 Scenario and Coding Questions](https://testingbot.com/resources/courses/selenium-interview-questions/scenario-and-coding-questions)
## You finished Selenium & Playwright Interview Questions

Put what you learned into practice. Run your tests on 6100+ real browsers and physical iOS and Android devices.

[Start free trial](https://testingbot.com/users/sign_up) [See pricing](https://testingbot.com/pricing) [Browse other courses](https://testingbot.com/resources/courses)
