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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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.
For hands-on practice with the frameworks behind these questions, continue with the Playwright course or Selenium with TestNG; mobile candidates can follow the Appium with WebdriverIO course.
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.