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.

1 example questions

  1. 1. Selenium 4 removed DesiredCapabilities in favor of which approach for configuring a session?

    • A. Browser-specific Options classes (e.g., ChromeOptions).correct
    • B. A global XML config.
    • C. Hard-coded JSON only.
    • D. Capabilities are no longer supported at all.

    Why: Selenium 4 standardized on W3C-compliant, browser-specific Options classes (ChromeOptions, FirefoxOptions, …) instead of the legacy DesiredCapabilities.

Related Automation Testing topics