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 natively automate desktop applications like Excel.correct
- B. Selenium supports Chrome DevTools Protocol (CDP) access in Selenium 4 for network interception and emulation.
- C. Selenium Grid enables distributing test execution across multiple machines and browsers.
- D. CSS selectors are generally faster and more readable than complex XPath expressions.
Why: The selected statement is false. The other options are accurate statements about Selenium.
2. Which statement about Selenium is NOT correct?
- A. CSS selectors are generally faster and more readable than complex XPath expressions.
- B. Selenium auto-waits for elements to be actionable before every click, like Playwright.correct
- C. Selenium Manager (bundled since 4.6) automatically downloads matching browser drivers.
- D. Selenium supports Chrome DevTools Protocol (CDP) access in Selenium 4 for network interception and emulation.
Why: The selected statement is false. The other options are accurate statements about Selenium.
3. Identify the INCORRECT statement about Selenium:
- A. Selenium supports Chrome DevTools Protocol (CDP) access in Selenium 4 for network interception and emulation.
- B. Selenium can execute JavaScript in the browser via JavascriptExecutor.
- C. A StaleElementReferenceException means the element locator syntax is invalid.correct
- D. Selenium Manager (bundled since 4.6) automatically downloads matching browser drivers.
Why: The selected statement is false. The other options are accurate statements about Selenium.
4. During a code review, a reviewer asks: 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.
5. Which of the following statements about Selenium is FALSE?
- A. A StaleElementReferenceException occurs when a previously found WebElement is no longer attached to the DOM.
- B. Selenium 4 still relies on the JSON Wire Protocol for all browsers.correct
- C. Selenium supports Chrome DevTools Protocol (CDP) access in Selenium 4 for network interception and emulation.
- 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.