Selenium Interview Questions for 2026: 40+ Questions for QA Engineers, SDETs, and Manual-to-Automation Pivot Candidates
Selenium interview questions in 2026 test more than locator syntax. Interviewers probe explicit-wait reasoning, Page Object Model design, framework architecture, Selenium Grid scaling, and whether you can defend Selenium against the Cypress and Playwright wave. This guide covers 40+ questions across six categories, the manual-to-automation pivot path, and the framework comparisons every QA Engineer and SDET candidate gets asked.
By Alex Chen, Founder, InterviewChamp.AI · Last updated
27 min readWhat Selenium interview questions really test in 2026
Selenium interview questions in 2026 test four things in this order: whether you can write maintainable test code (not just code that passes), whether you understand the WebDriver architecture deep enough to debug flakiness, whether you can defend Selenium against the Cypress and Playwright pitch, and whether you can talk through a framework design under live observation. The syntax check is the floor. Almost every QA candidate clears it. The architecture check and the framework-design check are where most QA Engineer and SDET interviews are won or lost.
The 2026 hiring environment has shifted the bar. With Cypress and Playwright pulling JavaScript-stack teams away from Selenium, the QA roles still using Selenium are concentrated in enterprise Java shops, regulated industries (finance, healthcare, insurance), and any team running large cross-browser regression suites where Grid 4 still wins. That means more interviewers are looking for senior signals: framework design choices, maintainability arguments, and the Cypress-vs-Selenium tradeoff conversation. A candidate who can recite WebDriver methods but can't explain why their team chose Selenium over Cypress reads as someone who used the tool without thinking about it.
The distribution of question types most QA Engineer and SDET candidates report seeing in their loops:
- 25-30% WebDriver fundamentals (architecture, drivers, browser interactions)
- 20% locators and waits (CSS vs XPath, explicit vs implicit, FluentWait)
- 15-20% Page Object Model and framework design
- 15% TestNG or JUnit (annotations, parallel execution, data providers)
- 10% Selenium Grid and CI integration
- 10-15% language-specific code (Java, Python, or C# depending on the role)
The framework-design 15-20% slice is the one most pivot candidates underprepare for. It's also the slice that disproportionately determines whether the offer is QA Engineer or SDET. The QA Engineer who can talk framework design moves up a band; the one who can't stays in scripts-only roles.
How Selenium interview questions differ from general QA interviews
A general QA interview tests test-case design, defect-management process, and exploratory testing skill. A Selenium interview adds three dimensions that rarely appear in interviews for manual QA roles:
Programming depth. Selenium is a library, not a test platform. Every Selenium interview is also a coding interview. The bar at the QA Engineer level is "write a small Selenium test from scratch against a live site." The bar at the SDET level is "write a small framework: POM, base classes, test data abstraction, reporting." Candidates who treat Selenium as a record-and-playback tool get filtered out by the live coding round.
Architecture awareness. Interviewers probe whether the candidate has shipped a framework, not just used one. Questions like "walk me through the layers of a typical Selenium framework" or "where would you put the wait logic, in the test, in the Page Object, or in a helper class?" separate candidates who built frameworks from candidates who only ran tests inside one.
The competitor conversation. Almost every Selenium interview in 2026 includes some version of "why Selenium and not Cypress" or "what's your view on Playwright." Interviewers want to see calibration: a candidate who claims Selenium wins on everything reads as inexperienced; a candidate who can articulate the actual tradeoffs (cross-browser depth, language flexibility, Grid for parallelism vs Cypress's faster local feedback) reads as someone who's been in the room when tooling decisions got made.
Three more concepts round out the surface area: TestNG or JUnit (the runner), Selenium Grid (the parallel layer), and CI integration (Jenkins, GitHub Actions, or your build system of choice). A candidate who can run a Selenium test in Docker via Grid and feed results into a CI report is showing fluency in two minutes that takes other candidates two interviews to demonstrate.
Honest call here: if you only have one week before a Selenium round, drill explicit waits and Page Object Model first. They show up in nearly every Selenium interview and being fast on them buys you credibility for the harder framework questions.
The 40+ Selenium interview questions you should rehearse
What follows is a structured rehearsal set covering the six categories that show up most. Each question has a sample answer outline. Not a full canned response, but the bones of what a strong answer covers. Adapt the language to your own voice. The structure is the load-bearing part.
Selenium WebDriver fundamentals interview questions (8 Q)
Q1. What is Selenium WebDriver and how does it differ from Selenium IDE?
WebDriver is the programmatic API for driving browsers. It sends commands over the W3C WebDriver protocol to a browser driver (chromedriver, geckodriver), which then controls the browser. Selenium IDE is the record-and-playback browser extension, useful for quick prototypes and non-programmer use but not used in production frameworks. WebDriver replaced the original Selenium RC architecture in 2011; Selenium 4 (2021) standardized on the W3C WebDriver protocol.
Q2. Walk me through the architecture of Selenium WebDriver.
Three layers. The client library (Java, Python, etc.) provides the API your tests call. The library serializes commands to HTTP requests against the W3C WebDriver protocol. The browser driver (chromedriver, geckodriver, msedgedriver) listens on a local port, receives those requests, and translates them into native browser commands via DevTools Protocol or the browser's automation API. Returns flow back through the same path. The protocol layer is why Selenium can support five languages: they all speak the same wire format.
Q3. What are the different types of WebDriver?
ChromeDriver, GeckoDriver (Firefox), EdgeDriver, SafariDriver, InternetExplorerDriver (legacy, deprecated 2022). For cross-platform automation: RemoteWebDriver, which connects to a Grid hub instead of a local driver. Mobile: AppiumDriver (extends WebDriver protocol for iOS and Android). Selenium 4 added explicit support for Chromium Edge and BiDi-capable drivers; older Edge Legacy (EdgeHTML) is deprecated.
Q4. How does Selenium 4 differ from Selenium 3?
Five concrete changes. W3C WebDriver protocol is the standard (JSON Wire is deprecated). Native BiDi support enables two-way browser events. Selenium Grid 4 consolidated hub-and-node into a single binary with four roles (Standalone, Hub, Node, Distributor). Relative locators (above, below, near, toLeftOf, toRightOf) were added. The deprecated DesiredCapabilities is replaced by browser-specific Options classes (ChromeOptions, FirefoxOptions). At the framework level, most code from Selenium 3 still compiles, but the deprecated APIs throw warnings.
Q5. How do you initialize a WebDriver in Selenium 4 (Java example)?
WebDriverManager.chromedriver().setup(); // optional, auto-downloads driver
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless=new", "--disable-gpu");
WebDriver driver = new ChromeDriver(options);
driver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(30));
driver.get("https://example.com");
The interview signal: do you set explicit options and timeouts, or do you just new ChromeDriver() and hope for the best. Setting headless mode and page-load timeout in the constructor reads as production-aware.
Q6. What's the difference between get() and navigate().to() in WebDriver?
driver.get(url) loads the URL and waits for the page-load event. driver.navigate().to(url) does the same but returns the Navigation object, which also exposes back(), forward(), and refresh(). Functionally equivalent for the load itself. Use navigate() when you need the back/forward/refresh in the same flow; use get() for clarity when you only need the load.
Q7. How do you maximize the browser window in Selenium?
driver.manage().window().maximize();
Or set the size explicitly:
driver.manage().window().setSize(new Dimension(1920, 1080));
For headless mode, maximize() is a no-op on some drivers; use setSize() explicitly. Many flakiness bugs trace back to viewport differences between headless and headed runs.
Q8. How do you handle JavaScript alerts, prompts, and confirms?
Switch to the alert context:
Alert alert = driver.switchTo().alert();
String text = alert.getText();
alert.accept(); // OK
alert.dismiss(); // Cancel
alert.sendKeys("input for prompt");
The alert isn't part of the DOM. Calling findElement on it fails. Use Wait until alertIsPresent() if the alert is delayed. After accept/dismiss, the alert is gone and switchTo().alert() throws NoAlertPresentException.
Selenium locators and waits interview questions (8 Q)
Q9. What are the different locator strategies in Selenium and which is fastest?
Eight: id, name, className, tagName, linkText, partialLinkText, cssSelector, xpath. The speed ranking (fastest to slowest): id, name, css selector, class name, xpath. The interview-correct answer: prefer id when available, then a stable data-testid via cssSelector, then more complex CSS or XPath. Speed differences are usually negligible compared to network latency. Choose stability over raw speed.
Q10. CSS Selector vs XPath: when do you use each?
CSS is faster, cleaner syntax, and works on every browser engine. XPath supports text-based queries (//button[text()='Submit']), axes navigation (parent, ancestor, following-sibling), and complex traversals CSS can't express. The default choice in 2026 is CSS; reach for XPath when you need text matching, parent navigation, or a position-based query CSS can't handle. Avoid raw //div/div/div[3]/span chains. They're the canonical flaky-locator pattern.
Q11. What's the difference between implicit, explicit, and fluent waits?
Implicit waits apply globally to every findElement call with a set polling duration. Explicit waits (WebDriverWait + ExpectedConditions) wait for a specific condition on a specific element. FluentWait extends WebDriverWait with custom polling intervals and ignored-exception lists. The production-grade pattern: never use implicit waits (they hide flakiness), use explicit waits with condition-matching, and reach for FluentWait when you need to ignore transient exceptions during polling.
Q12. Why is mixing implicit and explicit waits a problem?
They compound. If you set a 10-second implicit wait and a 30-second explicit wait on the same element, the actual wait can be 10 + 30 = 40 seconds (or longer in older Selenium versions where the behavior was unspecified). The deeper problem is that the implicit wait silently retries every findElement, hiding the exact moment a locator stops matching, making debugging much harder. The correct rule: pick one strategy, document it in the framework's BasePage, and enforce it in code review.
Q13. What's an ExpectedConditions class and name five conditions you use most.
ExpectedConditions is a Selenium utility class that returns waitable predicates. Five most common: visibilityOfElementLocated (element rendered and visible), elementToBeClickable (visible and enabled), presenceOfElementLocated (in DOM, may not be visible), textToBePresentInElement (specific text rendered), invisibilityOfElementLocated (element gone). For lists: numberOfElementsToBe, presenceOfAllElementsLocatedBy. For URL and title: urlContains, titleContains.
Q14. How do you wait for a page to fully load?
Three options. WebDriverWait on document.readyState:
new WebDriverWait(driver, Duration.ofSeconds(30))
.until(d -> ((JavascriptExecutor) d).executeScript("return document.readyState").equals("complete"));
Or wait on a specific element you know loads last (the footer, a post-render button). Or set pageLoadTimeout on the driver and rely on get()'s built-in wait. The first option works for SPAs where readyState fires before the JavaScript-rendered content is ready; combine it with a specific element wait for SPA reliability.
Q15. How do you handle a stale element reference exception?
StaleElementReferenceException means you held a WebElement reference that's no longer attached to the DOM, typically because the page re-rendered between locate and interact. The fix is to re-find the element inside a retry loop, or to architect your Page Object methods to find-and-act in one call rather than caching the element. PageFactory's @FindBy proxies are particularly prone to this; switching to plain By locators in helper methods is the modern remediation.
Q16. How do you find a parent element from a child in Selenium?
XPath axes: child.findElement(By.xpath("./..")); or child.findElement(By.xpath("./ancestor::div[@class='card']")). CSS Selector can't go up the DOM, so XPath is the right choice here. Most modern Page Object designs avoid parent traversal by structuring locators with parent context, but the question still gets asked.
Selenium TestNG and JUnit interview questions (6 Q)
Q17. What are the main TestNG annotations?
@Test (marks a test method), @BeforeMethod / @AfterMethod (run before/after each test), @BeforeClass / @AfterClass (once per class), @BeforeTest / @AfterTest (once per <test> tag in testng.xml), @BeforeSuite / @AfterSuite (once per suite). @DataProvider supplies parameterized test data. @Listeners hooks into TestNG events (failure capture, custom reporting). The exam-worthy nuance: BeforeTest is testng.xml's <test> tag scope, not "before each test method", which is BeforeMethod.
Q18. How does a TestNG @DataProvider work?
A method annotated with @DataProvider returns an Object[][]. Each row becomes one execution of the linked test method. Example:
@DataProvider(name = "loginData")
public Object[][] loginData() {
return new Object[][] {
{"[email protected]", "correct-pass", true},
{"[email protected]", "wrong-pass", false},
{"", "any", false}
};
}
@Test(dataProvider = "loginData")
public void testLogin(String email, String password, boolean expectedSuccess) { ... }
This runs three test executions, one per row. Data providers can also return Iterator<Object[]> for lazy generation from CSV, Excel, or a database.
Q19. What's the difference between TestNG and JUnit 5 for Selenium frameworks?
Parallel execution: TestNG's testng.xml configures parallel by suite, test, class, or method declaratively; JUnit 5 uses junit.jupiter.execution.parallel.enabled with a configuration strategy. Data providers: TestNG's @DataProvider is the canonical pattern; JUnit 5 uses @ParameterizedTest with @MethodSource. Dependencies: TestNG supports @Test(dependsOnMethods=...) ordering; JUnit 5 deliberately does not (test independence is the JUnit philosophy). Most existing Selenium tutorials and corporate frameworks use TestNG; JUnit 5 is gaining ground but TestNG is still the default in 2026 enterprise QA postings.
Q20. How do you skip a test conditionally in TestNG?
Throw SkipException inside the test or BeforeMethod:
@Test
public void testFeatureA() {
if (!isFeatureAEnabled()) {
throw new SkipException("Feature A not enabled in this environment");
}
// test body
}
Or use the @Test(enabled = false) flag for permanent disable, or @BeforeMethod with conditional logic that throws SkipException to gate entire test classes by environment.
Q21. What does the priority attribute do in @Test?
@Test(priority = 1) sets execution order. Lower numbers run first. Default priority is 0. The interview trap: priority does NOT enforce dependency. If priority-1 fails, priority-2 still runs. For real dependencies use dependsOnMethods or dependsOnGroups. New automation engineers often misuse priority as a dependency mechanism; senior interviewers ding this.
Q22. How do you parameterize tests from an external Excel or CSV file?
Return an Iterator from @DataProvider that reads the file row by row. For CSV, use a small parser library (Apache Commons CSV or OpenCSV). For Excel, use Apache POI for .xlsx. The pattern:
@DataProvider(name = "fromCsv")
public Iterator<Object[]> fromCsv() throws IOException {
return Files.lines(Paths.get("data/login.csv"))
.map(line -> line.split(","))
.map(parts -> new Object[]{parts[0], parts[1], Boolean.parseBoolean(parts[2])})
.iterator();
}
Most production frameworks abstract this into a DataReader utility class so the same CSV-loading logic is reused across data providers.
Page Object Model interview questions (6 Q)
Q23. What is the Page Object Model and why use it?
POM is a design pattern where every page in the application gets a class that encapsulates its elements and the actions a test would perform on them. Tests call page methods (loginPage.loginAs(user, pass)) instead of touching locators or WebDriver directly. The benefits: locator changes touch one file, tests read like business workflows, code duplication drops by 60-80% on suites with 100+ tests, and the framework scales to teams of 5+ automation engineers without merge-conflict chaos.
Q24. Walk me through the layers of a Page Object framework.
Four layers in a typical production setup. BasePage at the bottom: driver reference, common wait helpers, screenshot capture. Concrete Page Objects (LoginPage, DashboardPage) extending BasePage, exposing business methods. ComponentObjects for reusable widgets (NavigationBar, ToastNotification) used across many pages, composed into Page Objects. Test classes at the top, calling Page Object methods, holding no locators directly. Plus utility layers: DataReader, ConfigManager, DriverFactory, custom Wait helpers.
Q25. What's the difference between PageFactory and a plain Page Object?
PageFactory uses @FindBy annotations and a static initElements() call that lazy-proxies WebElement fields:
@FindBy(id = "username") WebElement usernameField;
public LoginPage(WebDriver driver) { PageFactory.initElements(driver, this); }
Plain Page Object uses By locators and explicit findElement calls inside methods:
private final By usernameField = By.id("username");
public LoginPage type(String username) {
driver.findElement(usernameField).sendKeys(username);
return this;
}
PageFactory's lazy proxies cache the WebElement reference, causing StaleElementReferenceException when the DOM updates. Plain Page Objects find fresh on every call, which is slower but more reliable. Most senior automation engineers in 2026 prefer plain Page Objects for that reason.
Q26. How do you handle reusable UI components (header, footer, modals) in POM?
Extract them into ComponentObject classes that take a parent WebElement or a scoped locator. The NavigationBar component is initialized inside any Page Object that contains it:
public class DashboardPage extends BasePage {
private final NavigationBar nav = new NavigationBar(driver);
public ProfilePage clickProfile() { return nav.clickProfile(); }
}
The component owns its locators and methods; the page composes the component. This is the difference between a flat Page Object layer (one class per page, lots of duplication) and a tiered one (Page composes Components composes WebElements).
Q27. Where should waits live in a Page Object framework?
Inside helper methods on BasePage or inside the Page Object methods themselves, never in the test class. The test should read like a business workflow:
loginPage.loginAs(user, pass);
dashboardPage.expectGreeting("Hello, Maya");
The wait for the greeting element is inside expectGreeting, hidden from the test. If waits leak into test methods, the framework abstraction is broken and the tests become hard to read and maintain.
Q28. How do you handle multiple pages that share common actions (e.g., a global logout)?
Promote the shared action to BasePage:
public class BasePage {
protected WebDriver driver;
public LoginPage logout() {
driver.findElement(By.id("logout-btn")).click();
return new LoginPage(driver);
}
}
Every Page Object extending BasePage gets logout() for free. Common candidates: logout, navigation, header search, footer-link clicks, modal-dismiss helpers. Resist the urge to bloat BasePage. Keep it to actions that genuinely apply to every page.
Selenium framework design interview questions (6 Q)
Q29. What's the difference between a data-driven, keyword-driven, and hybrid framework?
Data-driven: test logic is fixed, inputs vary (TestNG @DataProvider feeding the same test method with different rows). Keyword-driven: test steps are abstracted into reusable keywords (clickButton, enterText, verifyText) that non-programmers can chain in spreadsheets. Hybrid: combines both, with keywords for high-frequency actions, data providers for input variation, plus Page Objects for structure. Most production frameworks in 2026 are hybrid: POM + data providers + Allure/ExtentReports + CI hooks.
Q30. Walk me through the architecture of a Selenium framework you've built.
This is the signature SDET-bar question. A passing answer covers six layers. (1) Build system: Maven or Gradle, dependency management. (2) Driver factory: ThreadLocal<WebDriver> with options for headless, browser type, Grid URL. (3) Configuration: typed config object loaded from properties files per environment. (4) Page Objects: BasePage + concrete pages + ComponentObjects. (5) Test layer: TestNG or JUnit 5, organized by feature or by user journey. (6) Reporting: Allure or ExtentReports, screenshot capture on failure via a TestNG listener, integration with CI for HTML report publication.
I'd add from watching candidates do this: don't pretend you've built more than you have. Senior interviewers can tell within two minutes when the candidate is reciting layers they read about vs explaining layers they've shipped. If your portfolio framework has three layers, talk about three layers with depth. The depth is the signal.
Q31. How do you handle test data in a Selenium framework?
Three patterns by use case. Static test data: properties files or JSON loaded at suite start, immutable across tests. Generated test data: each test creates the data it needs via API calls in the BeforeMethod (faster than UI setup, and isolates tests from each other). External test data: CSV or Excel loaded via DataReader utility for data-driven scenarios. The anti-pattern: hardcoding email addresses or user IDs in test classes. Every shared test data ID becomes a flakiness vector when tests run in parallel.
Q32. How do you handle reporting and screenshots on failure?
A TestNG listener that hooks onTestFailure:
public class ScreenshotListener implements ITestListener {
public void onTestFailure(ITestResult result) {
WebDriver driver = ((BaseTest) result.getInstance()).getDriver();
byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
Allure.addAttachment("Failure screenshot", new ByteArrayInputStream(screenshot));
}
}
Register the listener in testng.xml or via @Listeners. The same listener can capture DOM snapshots, browser console logs, and network HAR files for richer post-failure debugging. Allure and ExtentReports both have first-class TestNG listener integrations.
Q33. How do you configure a Selenium framework to run across multiple environments (dev, staging, prod)?
Externalize all environment-specific values (base URL, credentials, feature flags) into properties files: config-dev.properties, config-staging.properties, config-prod.properties. Load the right file at suite start based on a system property:
String env = System.getProperty("env", "dev");
Properties config = new Properties();
config.load(new FileInputStream("config-" + env + ".properties"));
Pass via Maven: mvn test -Denv=staging. Never hardcode URLs or credentials in code. Production-aware frameworks also support secret injection from CI environment variables for credentials.
Q34. What's your view on Selenium vs Cypress vs Playwright in 2026?
This is the question every SDET interview asks. A calibrated answer:
- Selenium wins for cross-browser depth (Chrome, Firefox, Safari, Edge), language flexibility (Java, Python, C#, JavaScript, Ruby), Grid for distributed parallel runs, and entrenched enterprise tooling.
- Cypress wins for fast local TDD on JavaScript stacks, in-browser debugging UX, and time-travel snapshots. Historically weak on multi-tab and cross-origin (mitigated in Cypress 12+), still JavaScript-only.
- Playwright wins for modern API design, native auto-wait, parallel execution out of the box, true cross-browser (Chromium, Firefox, WebKit) with one binary, and full network interception. Multi-language but smaller ecosystem than Selenium.
Most teams in 2026 use Selenium for the broad regression suite and one of Cypress or Playwright for developer-side fast feedback. Picking one and trash-talking the others is the trap; calibrated tradeoff awareness is the signal.
Selenium Grid and CI interview questions (6 Q)
Q35. What is Selenium Grid and how does it work?
Selenium Grid distributes test execution across machines. A hub coordinates one or more nodes; each node registers its capabilities (browser, OS, version). Tests submitted to the hub via RemoteWebDriver get routed to a matching node. Grid 4 (2021, still stable in 2026) consolidates the hub-and-node architecture into a single binary with four roles: Standalone, Hub, Node, Distributor. The Distributor and EventBus pieces support large clusters (50+ nodes) better than Grid 3 did.
Q36. How do you set up Selenium Grid locally?
Pull the official Docker images and run with docker-compose:
services:
selenium-hub:
image: selenium/hub:4.16.1
ports: ["4442:4442", "4443:4443", "4444:4444"]
chrome:
image: selenium/node-chrome:4.16.1
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
Point your RemoteWebDriver at http://localhost:4444/wd/hub. The hub UI at port 4444 shows registered nodes, queued sessions, and execution status.
Q37. How do you integrate Selenium tests with Jenkins or GitHub Actions?
The canonical pattern. Jenkins: a freestyle or pipeline job that pulls the framework repo, runs mvn test -Denv=staging, archives the Allure report as a build artifact, and publishes the report via the Allure plugin. Slack or email notifications on failure via post-build hooks. GitHub Actions: a workflow YAML that runs on PR or schedule, sets up Java, runs Maven, and uploads the Allure report as a workflow artifact. For Grid-based runs, the workflow spins up a Grid container in a service job and points the framework at the in-container hub URL.
Q38. How do you run Selenium tests in headless mode?
ChromeOptions for Chrome:
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless=new", "--disable-gpu", "--window-size=1920,1080");
WebDriver driver = new ChromeDriver(options);
Note --headless=new (Selenium 4 / Chrome 109+) is the modern headless mode that matches headed-Chrome behavior closely. The old --headless argument still works but has known differences with font rendering and some CSS. Firefox uses FirefoxOptions with addArguments("-headless").
Q39. How do you handle browser cookies and local storage in Selenium?
Cookies via driver.manage():
driver.manage().addCookie(new Cookie("session", "abc123"));
Cookie cookie = driver.manage().getCookieNamed("session");
driver.manage().deleteAllCookies();
LocalStorage is not part of WebDriver natively. Use JavascriptExecutor:
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("window.localStorage.setItem('key', 'value');");
String value = (String) js.executeScript("return window.localStorage.getItem('key');");
Use cases: skipping the login UI by injecting a session cookie or a token, seeding feature flags, or asserting state set by the application.
Q40. What's a common Selenium Grid mistake at the production level?
Two compete for first. Mistake one: running Grid without resource limits on the nodes. A runaway test leaks browser processes, the node OOMs, and the hub's load-balancer keeps routing tests to it because it still appears available. Fix: container memory limits in Docker, plus a node-cleanup script that restarts unhealthy nodes. Mistake two: not configuring max-sessions per node. By default, a Grid 4 node accepts unlimited sessions, which causes resource starvation. Fix: set --max-sessions to a number that matches the node's actual CPU and memory budget.
How to prepare for a Selenium interview (6 steps)
A focused six-week prep plan, scaled for a manual QA tester pivoting to automation. The pace assumes 2-3 focused hours per day. Adjust if your starting point is further along (already comfortable in Java or Python) or further back (need to learn the language first).
-
Week 1: pick one language and go deep. Java if the target market is enterprise QA. Most US Selenium postings in 2026 still list Java. Python if you want a shorter ramp and your target is web-startup SDET roles. Avoid the trap of half-learning both. Aim for intermediate fluency: loops, classes, exception handling, file I/O, basic data structures, lambdas.
-
Week 2: drill WebDriver fundamentals. Install Selenium WebDriver, set up a project with Maven or Gradle, and write 20-30 small tests covering element interactions: click, sendKeys, getText, getAttribute, dropdown selection, frame switching, alert handling, window/tab management. Practice the eight locator strategies and benchmark when each is the right choice.
-
Week 3: build one end-to-end framework project. Pick a public site (a free e-commerce demo or your own portfolio site) and build a small framework with POM, BasePage, explicit waits in helpers, TestNG, and Allure reporting. Push to GitHub with a README that explains the architecture choices. No portfolio project means no offer at the SDET bar.
-
Week 4: learn TestNG annotations and data providers. @BeforeSuite through @AfterSuite, @DataProvider for parameterization, groups and dependencies, testng.xml configuration, parallel execution patterns. Most Selenium interviews include at least one TestNG annotation question; treating TestNG as "just the runner" is a fail signal.
-
Week 5: set up Selenium Grid locally and run cross-browser tests. Pull the selenium/hub and selenium/node Docker images, spin up a local Grid 4 cluster, and route your existing tests through RemoteWebDriver. Run the same suite on Chrome, Firefox, and Edge nodes. Document the docker-compose.yml in your portfolio.
-
Week 6: run 3-5 timed Selenium mock interviews. 45 minutes each, covering a coding round (write a small test from scratch against a live site), a framework-design round (whiteboard the architecture of your portfolio project), and a behavioral round on the manual-to-automation pivot. Narrate your reasoning out loud while coding. Silent debugging is a known SDET-round anti-pattern.
The manual-to-automation pivot path for QA candidates
This section is for the QA tester reading this guide who's been doing manual testing for 18 months to 4 years and is staring at job postings that all require Selenium. The path is real and it works. The path is also not "list Selenium on a resume and hope." Here's what makes the pivot land.
The resume re-positioning. Don't claim experience you don't have. Do reframe the experience you do have in automation-adjacent language. Manual test cases become "designed and executed test scenarios across functional, regression, and exploratory testing." Bug reports become "documented defects with reproducible steps, severity assessment, and root-cause analysis." Test plans become "authored test plans covering acceptance criteria for N feature releases." The QA fundamentals carry into automation; you're not throwing them away, you're adding a programming layer on top.
The portfolio project is the credibility anchor. Every pivot candidate who lands an SDET offer in 2026 has at least one public Selenium project on GitHub. The project shows: a framework you built (not just tests you wrote), Page Object Model in practice, explicit waits in helper methods, TestNG annotations used correctly, a README explaining your architecture choices, and CI integration (GitHub Actions running your suite on push). 6-12 hours of focused work over a weekend produces a credible project. No portfolio project equals "I read about Selenium but haven't built anything in it" to a senior interviewer.
The narrative for the behavioral round. Manual-to-automation pivots get asked the same three questions across nearly every interview loop. "Why are you pivoting?" Answer with growth, not escape ("I want to operate at the framework level, not just the test-case level"). "What's the hardest thing you've learned in your pivot?" Pick something specific like "understanding why explicit waits beat implicit waits, and rewriting my first project to use them everywhere." "What's your view on manual testing vs automation?" Neither is dead, both have a place. Automation is the regression net while manual is the exploratory layer. Calibrated answers, not "automation is the future."
The realistic timeline. Manual QA testers who do this consistently land mid-level SDET roles in 3-6 months from the start of focused prep. The pivot fails most often when candidates fragment their attention across Selenium plus Cypress plus Playwright plus appium plus REST Assured plus K6 plus everything else. Pick one (Selenium) and ship a project before broadening.
One thing I'd add from watching pivot candidates do this: the first three Selenium interviews are brutal. You'll get asked questions you've never seen and freeze on the framework-design round. That's not a sign the pivot doesn't work. That's the calibration gap closing. By interview 5-6 the pattern is automatic. Run mocks before live interviews so the calibration cost doesn't come out of real opportunities.
Selenium interview format by role type
The same Selenium library gets tested differently depending on what role you're interviewing for. The breakdown for the four most common roles asking Selenium in 2026:
| Role | Coding depth | Framework depth | Grid / CI focus | Cross-browser | Domain extras |
|---|---|---|---|---|---|
| Manual QA → Automation Pivot | Medium | Medium | Low | Low | API testing basics |
| QA Engineer (mid-level) | Medium-High | High | Medium | Medium | TestNG, Allure, BDD (Cucumber) |
| SDET (mid to senior) | High | Very High | High | High | Java/Python depth, CI, Docker, REST Assured |
| Test Architect | Medium | Very High | Very High | High | Multi-team framework design, tooling decisions |
Two patterns to notice. First, every role tests framework design at moderate-to-high depth. Knowing Selenium API alone doesn't get past the QA Engineer interview. Second, Grid and CI knowledge correlates with seniority. Manual-pivot candidates can skip the Grid deep-dive on the first interview cycle, but SDET candidates can't.
Selenium vs Cypress vs Playwright comparison
The most common framework comparison every Selenium interview asks about. A calibrated breakdown of each tool's strengths, weaknesses, and 2026 use cases:
| Dimension | Selenium 4 | Cypress 13+ | Playwright 1.40+ |
|---|---|---|---|
| Languages | Java, Python, C#, JS, Ruby | JavaScript only | Java, Python, .NET, JS |
| Browser engines | Chrome, Firefox, Edge, Safari, IE (legacy) | Chrome family, Firefox, Edge | Chromium, Firefox, WebKit |
| Architecture | External WebDriver protocol | In-browser test runner | Native browser automation |
| Auto-wait | Manual (explicit waits) | Built-in | Built-in |
| Parallel execution | Via Grid or framework runner | Cypress Cloud or paid plan | Built-in (test-level parallel) |
| Multi-tab / cross-origin | Full support | Improved in 12+ | Full support |
| Network interception | Via BiDi (Selenium 4) | Built-in | Built-in |
| Mobile (real device) | Via Appium | No | No (mobile emulation only) |
| Maturity / ecosystem | Largest, oldest | Strong on JS | Newer, fast-growing |
| Best fit (2026) | Cross-browser regression, enterprise Java | Developer TDD, JS stacks | Modern multi-browser, async-heavy SPAs |
The calibrated takeaway every interviewer wants to hear: Selenium isn't dead. It's the right choice when you need true cross-browser depth, multi-language support, or Grid-scale parallelism. Cypress and Playwright are right when you're on a JavaScript stack and value fast local feedback. Most enterprise teams in 2026 run a hybrid: Selenium for the broad regression suite, one of Cypress or Playwright for the developer fast loop.
Selenium WebDriver cheat sheet
A one-page reference of the top 20 patterns, organized for the morning-of warmup. The act of writing this from memory is the prep; carrying it into the interview is the safety net.
| # | Pattern | Use case |
|---|---|---|
| 1 | driver.findElement(By.id("x")) | Find by ID |
| 2 | driver.findElements(By.css(".item")) | Find list, returns empty if none |
| 3 | new WebDriverWait(driver, Duration.ofSeconds(10)).until(...) | Explicit wait |
| 4 | ExpectedConditions.visibilityOfElementLocated(by) | Wait for element visible |
| 5 | ExpectedConditions.elementToBeClickable(by) | Wait for clickable |
| 6 | Select select = new Select(element); select.selectByVisibleText("X") | Dropdown |
| 7 | driver.switchTo().frame("iframeName") | Switch into iframe |
| 8 | driver.switchTo().defaultContent() | Exit iframe |
| 9 | driver.switchTo().alert().accept() | Accept alert |
| 10 | Actions actions = new Actions(driver); actions.moveToElement(e).click().perform() | Compound action |
| 11 | ((JavascriptExecutor) driver).executeScript("arguments[0].click()", element) | JS click bypass |
| 12 | driver.manage().window().setSize(new Dimension(1920, 1080)) | Set viewport |
| 13 | ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE) | Screenshot |
| 14 | driver.manage().addCookie(new Cookie("s", "abc")) | Add cookie |
| 15 | new ChromeOptions().addArguments("--headless=new") | Headless mode |
| 16 | RemoteWebDriver(new URL("http://localhost:4444"), options) | Grid driver |
| 17 | @DataProvider(name = "x") public Object[][] x() | TestNG data provider |
| 18 | PageFactory.initElements(driver, this) | Page Object init |
| 19 | driver.findElement(By.xpath("./..")) | Find parent |
| 20 | try { driver.findElement(by); return true; } catch (NoSuchElementException e) { return false; } | Check existence |
Memorize the top half. The bottom half is the polish for the framework round.
Common Selenium interview mistakes for QA pivot candidates
The seven most-reported mistakes from pivot interviews in the 2025-2026 cycle, in roughly the order of frequency:
Using Thread.sleep instead of explicit waits. The single loudest flakiness signal in a Selenium codebase. Every senior interviewer asks why you'd never write Thread.sleep(5000) and wants the explicit-wait answer. If you have any Thread.sleep in your portfolio project, replace it before the interview.
Treating Selenium as a record-and-playback tool. Selenium IDE was the record-and-playback layer; it's been deprecated for production use since the early 2010s. Pivot candidates who describe their workflow as "record the test, then edit" mark themselves as Selenium IDE users, not WebDriver framework engineers. Lead with framework design, not recording.
Not knowing the difference between explicit and implicit waits. The single most-asked Selenium question, and the one pivot candidates most often get wrong. Memorize: implicit is global, explicit is condition-specific, never mix them, prefer explicit.
Confusing findElement and findElements. findElement throws on no match; findElements returns empty. Wrapping findElement in try-catch to detect absence is the anti-pattern; findElements with size() check is the idiom.
Claiming Selenium experience without a portfolio project. Senior interviewers ask to see the GitHub repo within the first five minutes. No public project means the resume claim is being audited live. Build the project before the interview, not during.
Saying "Selenium is the best" without nuance. The Cypress/Playwright comparison question is calibrated; the right answer acknowledges Selenium's strengths and the modern tools' strengths. Trash-talking the alternatives reads as inexperienced.
Not knowing how Page Object Model handles maintainability. The deepest POM question is "why is this pattern worth the abstraction overhead?" The answer: locator changes touch one file, tests read as workflows, parallelization is safe, code duplication drops dramatically. Pivot candidates who memorize the pattern name but can't articulate the why get filtered.
One thing I'd add from watching pivots do this: don't try to memorize all seven the night before. Pick the two that match how you've been writing tests in your portfolio project (almost always Thread.sleep and the explicit-vs-implicit confusion) and audit your last 10 commits for those patterns. Fix them in muscle memory. The other five take care of themselves once those two are gone.
Key terms
- WebDriver
- The W3C-standardized protocol Selenium uses to communicate with browsers. Sends commands over HTTP to a browser driver (chromedriver, geckodriver), which controls the actual browser. The protocol is why Selenium supports five languages: they all speak the same wire format.
- Page Object Model (POM)
- A design pattern where every page in the application gets a class encapsulating its elements and the actions tests would perform. Tests call page methods instead of touching locators directly. The single biggest signal of maintainability in a Selenium codebase.
- Explicit wait vs implicit wait
- Implicit waits apply globally to every findElement call. Explicit waits (WebDriverWait + ExpectedConditions) wait for a specific condition on a specific element. Production frameworks use only explicit waits because they make the wait condition visible and prevent flakiness-hiding patterns.
- Selenium Grid
- The distributed test execution layer. A hub coordinates nodes, each running browsers. Tests submitted to the hub get routed to a matching node by capability (browser, OS). Grid 4 (2021) consolidated hub-and-node into a single binary with four roles.
- TestNG and JUnit
- The two main Java test runners used with Selenium. TestNG offers richer parallel-execution configuration and built-in data providers; JUnit 5 caught up on most features but TestNG remains the default for Selenium framework projects in 2026 enterprise QA postings.
- PageFactory
- A Selenium support class that initializes WebElement fields via @FindBy annotations and lazy-proxies them. Popular through the mid-2010s; modern Selenium in 2026 typically uses plain By locators with explicit waits because PageFactory's cached references cause StaleElementReferenceException when the DOM updates.
- Stale element reference
- The exception thrown when a WebElement reference is no longer attached to the DOM, typically because the page re-rendered. The fix is to re-find the element inside helper methods rather than caching it across multiple actions.
- BiDi (Bidirectional protocol)
- The new WebDriver protocol introduced in Selenium 4 supporting two-way browser-to-test event streaming. Enables network interception, console log streaming, DOM mutation events, and performance metrics natively in Selenium without external libraries.
- Hybrid framework
- The default Selenium framework pattern in 2026: combines data-driven parameterization (via @DataProvider), keyword abstraction for common actions, and Page Object Model for structure. Plus reporting (Allure or ExtentReports) and CI integration.
Related guides
- HackerRank tech interview guide: the platform most likely to host the coding round in an SDET interview loop.
- CoderPad live coding interview: the platform most likely to host the live coding round in a Selenium pivot interview.
- Technical phone screen tactics: the round that tests Selenium fundamentals under live observation.
- Python interview questions: the Python depth that matters when your pivot target is a Python-based Selenium role.
- Mock interview practice: how to drill framework-design and live-coding rounds under realistic timing pressure.
- Data engineer interview questions: the comparison pivot for QA candidates wondering whether automation engineering or data engineering is the better target.
- LeetCode assessments tech interview guide: the algorithm-pattern depth most SDET interviews still expect.
About the author: Alex Chen is the founder of InterviewChamp.AI, building AI interview prep for the new-grad CS market and writing about the modern interview gauntlet from the inside.
Related guides
System Design Interview Guide for CS New Grads (2026): Framework, Templates, Cheat Sheet
The new-grad system design interview is a vocabulary check, a structure check, and a communication check, not a senior architect evaluation. This guide gives you a 4-step framework, a 12-template cheat sheet, a 45-minute time budget, the five canonical problems that carry 80% of new-grad rotations, and a side-by-side of HLD vs LLD vs machine-learning-system-design. Built for the CS new grad who has solved 600 LeetCode problems but never drawn a load balancer.
Alex Chen ·
Read more →The 2026 CS New-Grad Interview Loop: Phone Screen to Offer at Every Tier
The 2026 CS new-grad interview loop runs five steps (recruiter screen, technical screen, onsite, debrief, offer) but the shape of each step now depends on tier of company. This guide maps the loop for FAANG, mid-tier public, startup, consultancy, and research lab, with 2026 timelines and how AI-fraud concerns brought in-person rounds back.
Alex Chen ·
Read more →Accounting Interview Questions for 2026: 40+ Questions for Staff Accountants, Big 4 Candidates, and CPA Pivots
Accounting interview questions in 2026 test six things at once: do you know GAAP cold, can you walk a transaction from journal entry to the three financial statements, can you read a balance sheet under pressure, do you understand the difference between Big 4 audit and corporate close work, can you handle the behavioral round without sounding rehearsed, and can you reason through a case study when the prompt is intentionally vague. If you're an accounting grad, a CPA candidate, or pivoting from finance/ops into staff accountant work, the technical bar isn't the killer. It's framing what you know in 60 seconds while a senior manager watches you on Zoom. This guide walks 40+ questions across six categories, the Big 4 vs corporate vs public-accounting split, and the four-week prep plan that actually works.
Alex Chen ·
Read more →Frequently asked questions
- What Selenium interview questions should I prepare for in 2026?
- Prepare across six categories: WebDriver fundamentals (architecture, driver setup, browser interactions), locators and waits (CSS vs XPath, implicit vs explicit, FluentWait), TestNG or JUnit (annotations, data providers, parallel execution), Page Object Model (PageFactory, abstraction layers, the maintenance argument), framework design (hybrid vs data-driven vs keyword-driven), and Selenium Grid plus CI integration. Expect 60-70% on the first three areas at the QA Engineer bar and 50-50 across all six at the SDET bar.
- What's the difference between Selenium and Cypress in 2026?
- Selenium runs outside the browser via WebDriver protocol, supports five languages (Java, Python, C#, JavaScript, Ruby), works across Chrome, Firefox, Edge, Safari, and integrates with Selenium Grid for distributed runs. Cypress runs inside the browser as a JavaScript test runner, JavaScript-only, faster local feedback loops, but historically weak on multi-tab and cross-origin flows (mitigated in Cypress 12+). Selenium wins for cross-browser regression, parallel runs on Grid, and language flexibility. Cypress wins for fast local TDD on a JavaScript stack. Most teams in 2026 use both, with Selenium owning the regression suite and Cypress owning developer-side smoke tests.
- What is the Page Object Model and why do interviewers love asking about it?
- Page Object Model (POM) is a design pattern where every page in the application gets its own class that exposes methods for the actions and assertions a test would perform. Tests call those methods instead of touching locators directly. Interviewers love it because it's the single biggest signal of test-maintainability awareness. Candidates who can explain WHY POM matters (locator changes touch one file, not 50) and who can describe abstractions like BasePage and ComponentObjects rank above candidates who just memorized the pattern name. The follow-up question is usually whether you've used PageFactory and what its tradeoffs are.
- How do explicit waits differ from implicit waits in Selenium?
- Implicit waits apply globally to every findElement call and tell WebDriver to poll the DOM for a set duration before giving up. They're set once and forgotten. Explicit waits are conditional: they wait for a specific condition (element visible, element clickable, text present) using WebDriverWait and ExpectedConditions, scoped to a single interaction. The interview-correct answer is that you should never mix them (compound timeouts) and that explicit waits are the production-grade choice because they make the wait condition visible in the code and prevent the flaky-test patterns that implicit waits hide. FluentWait extends WebDriverWait with polling intervals and exception-ignore lists.
- What is Selenium Grid and when would you use it?
- Selenium Grid is the distributed test execution layer. A hub coordinates one or more nodes, each running browsers. Tests submitted to the hub get routed to a node matching the requested capability (Chrome on Linux, Firefox on Windows, Safari on Mac). Use it when your regression suite takes more than 30 minutes on a single machine, when you need cross-browser coverage you can't get locally, or when CI parallelism would meaningfully shorten your feedback loop. Grid 4 (released 2021, still the modern stable as of 2026) consolidated the hub-and-node architecture into a single binary with four roles: Standalone, Hub, Node, Distributor. Most teams now run Grid in Docker via the official selenium/hub and selenium/node images.
- How do you handle dynamic web elements in Selenium?
- Three layered tactics. First, write locators that don't depend on volatile attributes. Prefer stable test-id attributes (data-testid) and CSS selectors over fragile XPath chains. Second, use explicit waits with ExpectedConditions that match the actual user-visible condition (visibilityOfElementLocated, elementToBeClickable) rather than just presence. Third, when the element really is dynamic (modal that mounts late, list that paginates), parameterize the locator with format strings or builder patterns so a single Page Object method can target the right instance. Avoid Thread.sleep entirely. It's the loudest flakiness signal in a Selenium codebase.
- Can a manual QA tester realistically pivot to Selenium automation in 2026?
- Yes. It's one of the most common pivots in QA right now. The honest read: you need three things to make the pivot stick. A programming language at intermediate fluency (Python is the fastest learning curve; Java is the most-requested in 2026 job postings). Hands-on Selenium experience built outside the day job (one personal portfolio project that runs a real test suite against a real public site). And a framework story you can tell, not just 'I used Selenium' but 'I built a hybrid framework with POM, TestNG data providers, and Allure reporting.' Manual QA testers who do this consistently land mid-level SDET roles in 3-6 months. The pivot fails most often when candidates list Selenium on a resume without a portfolio project to back it up.
- What's the difference between findElement and findElements in Selenium?
- findElement returns the first matching WebElement or throws NoSuchElementException if nothing matches. findElements returns a List<WebElement> that's empty when nothing matches, never throwing. The practical implication: use findElements when zero matches is a valid state (checking whether an error message exists, counting items in a list) so your code branches on size() instead of catching exceptions. Use findElement when the element must exist for the test to be meaningful, so the exception becomes a clear failure signal. The anti-pattern is wrapping findElement in try-catch to detect absence; findElements is the idiom for that case.
- What is TestNG and how does it differ from JUnit?
- TestNG is a Java test framework heavily used in Selenium automation. Compared to JUnit 5, TestNG offers richer parallel-execution configuration (parallel suites, classes, tests, methods via testng.xml), built-in data providers for parameterized tests, dependency ordering between methods, listeners and reporters that plug in without extra wiring, and group-based test organization. JUnit 5 caught up on most features but TestNG remains the default for Selenium framework projects because of its parallel-run flexibility and the entrenched ecosystem of Selenium tutorials written in TestNG. Most 2026 QA Engineer job postings list TestNG explicitly when the role is Java-based.
- How do you handle file uploads and downloads in Selenium?
- File uploads use sendKeys on the file input element directly, passing the absolute path. The browser's native file dialog never opens because WebDriver bypasses it. Example: driver.findElement(By.id('file-input')).sendKeys('/abs/path/to/file.pdf'). Downloads are harder because the download dialog isn't part of the DOM. Configure browser preferences before driver instantiation (Chrome: prefs map with download.default_directory; Firefox: profile preferences) to auto-save to a known folder, then poll the filesystem in your test to confirm the file arrived. For Chrome headless mode, set the download path via DevTools Protocol command Page.setDownloadBehavior.
- What is PageFactory and should you use it in 2026?
- PageFactory is a Selenium support class that initializes WebElement fields via @FindBy annotations and lazy-proxies them. The actual findElement call happens on first method invocation. It was popular through the mid-2010s for the clean syntax. In 2026 the modern Selenium community has largely moved away from PageFactory for two reasons: lazy proxies cache the WebElement reference, causing StaleElementReferenceException when the DOM updates; and PageFactory's hidden findElement hides where waits should live. Modern POM in 2026 typically uses plain By locators with explicit waits in helper methods. If an interviewer asks, demonstrate awareness of PageFactory and explain why most senior automation engineers no longer use it.
- How do you debug a flaky Selenium test?
- Three layers of investigation. Layer one: instrumentation. Add screenshot capture on failure, full DOM snapshot at the point of failure, and browser console logs to your TestNG listener so you can see what the page looked like when the test broke. Layer two: timing. Most Selenium flakiness comes from race conditions between WebDriver and async UI updates. Replace any Thread.sleep with explicit waits on the real condition, and audit for implicit-wait collisions. Layer three: isolation. Run the failing test alone, then in parallel, then with browser-cache flags varied. A test that passes alone but fails in parallel almost always has shared state (cookies, local storage, test data IDs). Fix at the root, not by adding retries.
- What's the difference between a hybrid framework and a data-driven framework?
- A data-driven framework separates test data from test logic, so one test method runs against many input rows, typically via TestNG @DataProvider or external sources like Excel and CSV. A keyword-driven framework abstracts test steps into reusable keywords (clickButton, enterText) that non-programmers can chain in spreadsheets. A hybrid framework combines both: keywords for the high-frequency actions, data providers for the input variation, plus Page Objects for structure. Most 2026 production frameworks are hybrid: POM for structure, data providers for parameterization, an Allure or ExtentReports layer for reporting, and CI integration via Jenkins or GitHub Actions.
- How do you run Selenium tests in parallel?
- Three layers. At the test framework: TestNG configures parallel execution in testng.xml with parallel='methods' or 'classes' and thread-count='N', or JUnit 5 uses junit.jupiter.execution.parallel.enabled=true with a configuration strategy. At the WebDriver layer: each thread gets its own WebDriver instance. Never share a driver across threads. Use ThreadLocal<WebDriver> for the canonical pattern. At the execution layer: Selenium Grid distributes the parallel tests across nodes for true OS and browser variety, or you run all parallel threads against local browsers. The common new-grad trap is leaking driver instances or shared cookies between parallel threads. Audit your BeforeMethod and AfterMethod hooks carefully.
- What is Selenium 4's BiDi protocol and why does it matter?
- BiDi (Bidirectional) is the new WebDriver communication protocol that supports two-way browser-to-test event streaming, on top of the legacy JSON Wire Protocol's request-response model. Selenium 4 (released 2021, still stable in 2026) added native BiDi support, enabling features that were previously DevTools Protocol-only: network interception, console log streaming, DOM mutation events, performance metrics. For interviews, the relevant point is that Selenium 4 closed the gap with Cypress and Playwright on browser-introspection features. Network mocking, console assertions, and JavaScript dialogs now work natively in Selenium without external libraries. Expect at least one Selenium 4 feature question at the SDET bar.