Selenium interview questions — Hard
252 hard-level Selenium questions from our Automation Testing bank, each with the correct answer and an explanation of why it is correct.
What this covers
Selenium appears throughout Automation Testing interviews. At hard level, interviewers are typically checking depth under pressure — edge cases, failure modes, performance characteristics, and the trade-offs you accepted. Work through these, then explain your answer out loud; the second part is what interviews actually test.
5 example questions
1. Regarding Selenium, which of the following is a false statement?
- A. Selenium can execute JavaScript in the browser via JavascriptExecutor.
- B. A StaleElementReferenceException occurs when a previously found WebElement is no longer attached to the DOM.
- C. Selenium can natively automate desktop applications like Excel.correct
- D. Selenium Grid enables distributing test execution across multiple machines and browsers.
Why: The selected statement is false. The other options are accurate statements about Selenium.
2. Identify the INCORRECT statement about Selenium:
- A. Selenium Manager (bundled since 4.6) automatically downloads matching browser drivers.
- B. Explicit waits (WebDriverWait) poll for a specific condition, while implicit waits set a global element-lookup timeout.
- C. Selenium auto-waits for elements to be actionable before every click, like Playwright.correct
- D. Selenium 4 implements the W3C WebDriver protocol, removing the JSON Wire Protocol translation layer.
Why: The selected statement is false. The other options are accurate statements about Selenium.
3. Which statement about Selenium is NOT correct?
- A. Selenium auto-waits for elements to be actionable before every click, like Playwright.correct
- B. Selenium 4 implements the W3C WebDriver protocol, removing the JSON Wire Protocol translation layer.
- C. Actions class supports composite gestures like drag-and-drop, hover, and keyboard chords.
- D. The Page Object Model separates page structure from test logic to improve maintainability.
Why: The selected statement is false. The other options are accurate statements about Selenium.
4. Which of the following statements about Selenium is FALSE?
- A. Selenium 4 implements the W3C WebDriver protocol, removing the JSON Wire Protocol translation layer.
- B. Explicit waits (WebDriverWait) poll for a specific condition, while implicit waits set a global element-lookup timeout.
- C. Selenium 4 still relies on the JSON Wire Protocol for all browsers.correct
- D. Headless browser execution runs tests without a visible UI window and is common in CI pipelines.
Why: The selected statement is false. The other options are accurate statements about Selenium.
5. On a release readiness call: driver.findElements() returns what when nothing matches?
- A. Null.
- B. Throws NoSuchElementException.
- C. An empty list.correct
- D. An empty WebElement.
Why: findElements() returns an empty list; findElement() throws.