Selenium Interview Prep
118 questions with the answer an interviewer actually wants to hear, organised by level. Each answer links to the lesson that goes deeper.
Junior: Fundamentals
Questions for entry-level and first-year automation roles. Interviewers want correct definitions and one concrete example each.
1.What is Selenium WebDriver?
A library that lets code control a real browser through the W3C WebDriver protocol. Your test sends commands (open URL, find element, click) to a browser-specific driver such as chromedriver, which executes them in the browser. It is not a test framework: you pair it with JUnit, pytest, NUnit or Mocha for structure and assertions.
2.Explain the Selenium architecture.
Four parts: your language binding turns method calls into HTTP requests; the W3C WebDriver protocol defines those requests; the vendor's browser driver (chromedriver, geckodriver, msedgedriver, safaridriver) is an HTTP server that translates them into browser actions; the browser does the work. Selenium Manager sits before the driver to make sure the right executable exists. Grid sits between binding and driver to route commands to remote machines. BiDi adds a WebSocket alongside for events.
3.What are the different locator strategies?
id, name, className, tagName, linkText, partialLinkText, cssSelector and xpath, plus Selenium 4's relative locators (above, below, toLeftOf, toRightOf, near). Prefer a dedicated test id or a stable id, then name, then semantic CSS, then text, and use XPath when you need text matching or upward traversal.
4.What is the difference between findElement and findElements?
findElement returns the first match and throws NoSuchElementException if none. findElements returns a list of all matches, empty if none, and never throws. Use findElements for counting, iterating, and existence checks.
5.What is an implicit wait?
A session-wide timeout that makes every findElement retry until the element appears or the timeout expires. It is simple but blunt: it also slows every negative check and interacts badly with explicit waits. Most teams keep it at zero.
6.What is an explicit wait?
A wait tied to a specific condition and timeout, using WebDriverWait with an expected condition such as visibilityOfElementLocated or elementToBeClickable. It polls until the condition passes and then returns the element. It is the recommended synchronisation mechanism.
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));WebElement btn = wait.until(ExpectedConditions.elementToBeClickable(By.id("submit")));btn.click();7.Why is Thread.sleep bad practice?
It always waits the full time even if the app was ready earlier, and it still fails when the app is slower than the guess. Explicit waits proceed as soon as the condition holds and fail with a clear timeout otherwise.
8.What is the difference between close() and quit()?
close() closes the current window or tab only. quit() closes every window, ends the session and stops the driver process. Always quit() in cleanup, or CI machines accumulate orphaned browser processes.
9.How do you handle a JavaScript alert?
Switch to it with driver.switchTo().alert(), then accept(), dismiss(), getText() or sendKeys(). Wait for it with ExpectedConditions.alertIsPresent since it may appear a moment after the click. The unhandledPromptBehavior capability defines what happens to alerts you did not handle.
10.How do you work with an iframe?
Switch the driver's context into it with switchTo().frame(element or name or index), interact, then switchTo().defaultContent() to return to the main document. Wrap the work in try/finally so you always return.
11.What is a StaleElementReferenceException?
The WebElement you hold refers to a DOM node that was removed or replaced, typically because the framework re-rendered. Re-find the element after the change instead of caching it; a small retry helper handles the common case.
12.What is Selenium Manager?
A binary bundled with Selenium 4.6+ that detects the installed browser and downloads the matching driver into a cache automatically. From 4.11 it can also download the browser itself for a pinned version. It removed the need to manage chromedriver paths.
13.How do you take a screenshot?
Cast the driver to TakesScreenshot (Java) or call save_screenshot (Python), takeScreenshot (JavaScript), GetScreenshot (C#). Selenium 4 also supports screenshots of a single element. Capture on test failure in a framework hook.
File png = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);Files.copy(png.toPath(), Path.of("failure.png"));14.How do you select a value from a dropdown?
For a native select element, use the Select helper: selectByVisibleText, selectByValue or selectByIndex. For custom dropdowns built from divs, click the trigger and then click the option by text with a wait for visibility.
15.How do you upload a file?
Send the absolute path to the input[type=file] element with sendKeys. Do not click the button, because the OS dialog is outside the browser. On a Grid, set LocalFileDetector on RemoteWebDriver so the file is transferred first.
16.What is the Page Object Model?
A design pattern where each page or component gets a class that owns its locators and exposes methods named for user actions. Tests call those methods instead of locating elements. When the UI changes, you fix one class.
17.What is headless mode?
Running the browser without a visible window. Chrome uses --headless=new, Firefox -headless. It is faster and works on CI servers with no display. Set an explicit window size because there is no screen to maximise to.
18.What is the difference between getText() and getAttribute("value")?
getText() returns the rendered visible text between an element's tags. For inputs the typed content is the value property, read with getAttribute("value") or getDomProperty("value"). Hidden elements return empty text; use textContent for those.
19.How do you navigate back, forward and refresh?
driver.navigate().back(), forward() and refresh(). They use browser history. A refresh invalidates all WebElement references, so re-find afterwards.
20.What browsers does Selenium support?
Chrome, Edge, Firefox and Safari through vendor-maintained drivers, plus Chromium-based browsers via chromedriver. Older Internet Explorer support exists in Selenium 4 through IE mode in Edge. Mobile browsers and native apps are covered by Appium, which speaks the same protocol.
21.What is the difference between Selenium WebDriver, Selenium Grid and Selenium IDE?
WebDriver is the library you code against: it drives one browser through the W3C WebDriver protocol. Grid is a server that runs WebDriver sessions on remote machines and in parallel, so the same test code can target many browsers at once. IDE is a browser extension that records and replays clicks without code. In practice teams write tests with WebDriver, scale them with Grid, and use IDE only for quick exploration or bug reproduction.
22.What is a WebElement and what can you do with it?
A WebElement is Selenium's handle to one DOM node, returned by findElement. You can click it, type into it with sendKeys, clear it, read its text, attributes and properties, check isDisplayed/isEnabled/isSelected, take an element screenshot, and search inside it with its own findElement. It is a reference, not a copy: if the page replaces the node, the WebElement goes stale and must be found again.
WebElement email = driver.findElement(By.id("email"));email.clear();email.sendKeys("qa@example.com");String placeholder = email.getDomAttribute("placeholder");23.CSS selector or XPath: when do you use each?
Prefer CSS selectors for most locators: they are concise, fast and readable, and cover ids, classes, attributes and hierarchy. Use XPath when you need something CSS cannot do, mainly matching on visible text or navigating up to a parent or across to a sibling. Avoid absolute paths in either syntax. Whichever you choose, anchor on stable attributes such as data-testid, name or aria-label rather than layout.
By.cssSelector("[data-testid='checkout']")By.xpath("//button[normalize-space()='Place order']")By.xpath("//td[text()='ana@example.com']/parent::tr")24.What is the difference between absolute and relative XPath?
Absolute XPath starts at the document root with a single slash and lists every step, like /html/body/div[2]/form/input. It breaks as soon as any wrapper element is added or removed. Relative XPath starts with // and anchors on a meaningful attribute or text anywhere in the tree, like //form[@id='login']//input[@name='email']. Always use relative XPath; the 'Copy full XPath' output from DevTools is a starting point, not a locator.
25.How do you handle checkboxes and radio buttons?
Locate the input, check its current state with isSelected(), and click only if it is not already in the state you want, because clicking a checked checkbox unchecks it. For radio groups, locate the option by its value or label and click it. If the native input is visually hidden behind a styled label, click the associated label instead of forcing the input with JavaScript.
WebElement terms = driver.findElement(By.id("accept-terms"));if (!terms.isSelected()) { terms.click();}driver.findElement(By.cssSelector("input[name='plan'][value='pro']")).click();26.How do you hover over an element to open a menu?
Use the Actions API: moveToElement on the trigger, perform, then wait for the menu item to become visible before clicking it. Hover menus often open with a CSS transition, so clicking immediately can hit nothing. Keep the hover and click close together; moving the mouse elsewhere in between can close the menu.
new Actions(driver).moveToElement(driver.findElement(By.id("account-menu"))).perform();new WebDriverWait(driver, Duration.ofSeconds(5)) .until(ExpectedConditions.elementToBeClickable(By.linkText("Sign out"))) .click();27.What is NoSuchElementException and how do you troubleshoot it?
It means findElement found no match at the moment it ran. Work through the usual causes in order: the element has not rendered yet (add an explicit wait), the locator is wrong (test it in the DevTools console with $$ or $x), the element is inside an iframe or shadow root (switch or use getShadowRoot), or you are on a different page than you think (check the URL and a screenshot). Avoid wrapping it in try/catch; fix the cause.
28.What are browser Options classes and why do they replace DesiredCapabilities?
ChromeOptions, FirefoxOptions, EdgeOptions and SafariOptions configure a browser before the session starts: command-line arguments, preferences, headless mode, page load strategy, and extra capabilities. They are type-safe and browser-specific, so mistakes show up at compile time instead of as a silently ignored capability. DesiredCapabilities is a Selenium 3 pattern and should not appear in new Selenium 4 code; you pass the Options object to the driver constructor or to RemoteWebDriver.
ChromeOptions options = new ChromeOptions();options.addArguments("--headless=new", "--window-size=1920,1080");options.setPageLoadStrategy(PageLoadStrategy.EAGER);WebDriver driver = new ChromeDriver(options);29.How do you press Enter, Tab or other special keys?
Pass a Keys constant to sendKeys on the focused element, for example Keys.ENTER to submit a search or Keys.TAB to move focus. For combinations such as Ctrl+A, use the Actions API with keyDown and keyUp, or Keys.chord. Remember that the modifier key differs on macOS (COMMAND) versus Windows and Linux (CONTROL).
driver.find_element(By.NAME, "q").send_keys("selenium", Keys.ENTER)ActionChains(driver).key_down(Keys.CONTROL).send_keys("a").key_up(Keys.CONTROL).perform()30.How do you locate an element whose id changes on every page load?
Do not use the generated part. Look for an attribute that is stable: a data-testid, name, aria-label, role, or the element's visible label text. If only part of the id is stable, match the stable prefix or suffix with CSS ^= or $=, or XPath starts-with/contains. If nothing is stable, ask the developers to add a test id; that is a cheap fix compared with a brittle suite.
By.cssSelector("[id^='user-row-']")By.cssSelector("[data-testid='save-button']")By.xpath("//label[normalize-space()='Email']/following-sibling::input")31.What is the difference between isDisplayed(), isEnabled() and isSelected()?
isDisplayed() tells you whether the element is visible to a user (not hidden by CSS, not zero-size). isEnabled() tells you whether a form control can be interacted with, which is false for disabled inputs and buttons. isSelected() applies to checkboxes, radio buttons and options and tells you whether they are checked or chosen. All three need the element to exist first; on a missing element you get NoSuchElementException, not false.
32.Why should you keep the Selenium client library up to date?
Browsers update constantly (Chrome moved to two-week releases in 2026), and each Selenium release keeps the client in step with new browser and driver behaviour, BiDi features and bug fixes. The Selenium project's 2026 PSA warned that outdated clients cause flakiness that looks like test bugs. A sensible habit is a scheduled review at least quarterly, reading the release notes for removals before upgrading. As of November 2026 the latest stable release is 4.52.0.
Mid-Level: Building Suites
Questions for engineers expected to own a suite: design, synchronisation, CI, and the details that separate working code from maintainable code.
1.Why should implicit and explicit waits not be combined?
The driver applies the implicit wait inside every findElement, including the ones an explicit wait polls, so timeouts stack unpredictably. Negative checks (element should be absent) always burn the full implicit timeout. Set implicit wait to zero and use explicit waits with specific conditions.
2.What is FluentWait and how does it differ from WebDriverWait?
FluentWait is the general wait with configurable timeout, polling interval and a set of exceptions to ignore while polling. WebDriverWait is a FluentWait specialised for WebDriver with defaults of 500 ms polling and ignoring NoSuchElementException. You use FluentWait's builder when you need a faster poll or to ignore StaleElementReferenceException.
Wait<WebDriver> wait = new FluentWait<>(driver) .withTimeout(Duration.ofSeconds(15)) .pollingEvery(Duration.ofMillis(200)) .ignoring(StaleElementReferenceException.class);3.How do you write a custom expected condition?
Any function of the driver that returns a truthy value when satisfied and null/false otherwise. Return the useful value (element, list, text) so the caller can use it. Give it a description for readable timeout messages. Typical customs: attribute equals, count at least N, text stable across two polls.
4.What are the page load strategies and when would you change the default?
normal waits for the load event, eager for DOMContentLoaded, none returns immediately. Use eager for single-page apps and pages with slow third-party assets, paired with explicit waits for the elements you need. Use none when you need full control or a page never fires load.
5.How do you make tests run in parallel safely?
Give every test its own driver, never a shared static one. In Java use a ThreadLocal behind a manager class and remove() after quit(); in pytest use function-scoped fixtures with xdist workers; in NUnit use per-test instances. Isolate test data per test, avoid order dependence, and size parallelism to CPU and memory.
6.Design a driver factory.
One method reads configuration (browser, headless, grid URL, timeouts) from environment variables with defaults, builds the matching Options, and returns either a local driver or a RemoteWebDriver. It sets window size, page load timeout and, for remote, LocalFileDetector. All tests call it; nothing else constructs drivers.
7.How do you handle a new window or tab?
Capture the current handle and the set of handles before the click. After clicking, wait for the handle count to increase, compute the set difference to find the new handle, switch to it. When done, close it and switch back to the original before any other command.
8.How do you interact with Shadow DOM?
Locate the host element, call getShadowRoot() to obtain the shadow tree as a search context, then use CSS selectors from it. Repeat for nested hosts. XPath cannot cross shadow boundaries and closed shadow roots are unreachable.
9.What are relative locators and when are they appropriate?
Selenium 4 locators that find an element by position relative to another: above, below, toLeftOf, toRightOf, near. They use rendered bounding boxes, so they break on layout changes and small viewports. Use them when no stable attribute exists and you cannot add a test id.
10.Explain ElementClickInterceptedException and how you fix it.
The driver computed the click point and found another element on top: a sticky header, modal or toast. Fixes in order: wait for the overlay to disappear, scroll the target to the centre with scrollIntoView({block:'center'}), then as a logged fallback a JavaScript click.
11.How do you reuse a login session across tests?
Log in once, export cookies (or the token in localStorage) to a file, and before each test navigate to the domain, add the cookies, then go to the target page. Regenerate on expiry. Alternatively call the login API and set the resulting cookie directly.
12.How do you verify a downloaded file?
Configure a known download directory in the browser options, trigger the download, poll the filesystem until the file exists and no partial file remains, then parse it with a CSV or PDF library and assert on headers and distinctive values. On a Grid, use managed downloads (se:downloadsEnabled) to fetch the file from the node.
13.What goes into a good failure report?
Screenshot, page source, current URL, console errors and failed network requests from BiDi, the assertion message, and, on a Grid, the session id linking to video. Captured in the framework's after-hook on failure only, uploaded as a CI artifact or attached to Allure.
14.How do you structure a Selenium job in CI?
Headless with explicit window size, pinned or cached browser via Selenium Manager, parallelism matched to runner resources, timeouts at job and test level, artifacts on failure, secrets from the CI store. For version control or video, run the official Selenium image as a service container and use RemoteWebDriver.
15.What is the difference between Page Factory and plain Page Objects?
Page Factory (Java) initialises fields annotated with @FindBy as lazy proxies that locate on each access. Plain page objects hold By locators and call findElement explicitly. Page Factory is terser; explicit By fields are more flexible with waits and are the common recommendation today.
16.How do you test a page behind HTTP basic auth?
Enable BiDi and register an authentication handler with the credentials before navigating; it answers the challenge for matching requests in Chrome, Edge and Firefox. Embedding credentials in the URL is a legacy fallback that leaks into logs.
17.How do you get console errors from the browser?
With BiDi enabled, driver.script().addConsoleMessageHandler and addJavaScriptErrorHandler receive entries as they happen, cross-browser. The old driver.manage().logs().get("browser") API is Chromium-only and not part of the W3C spec.
18.What is data-driven testing and how do you implement it?
Running one test body against many input rows. TestNG DataProvider, JUnit 5 @ParameterizedTest with CSV or method sources, pytest.mark.parametrize, NUnit TestCaseSource. Keep data in files when it is large or shared, and name rows so failures identify the case.
19.How would you migrate a Selenium 3 suite to Selenium 4?
Bump to the latest 4.x. Replace DesiredCapabilities with Options and move vendor keys under prefixed maps. Convert Java timeouts to Duration. Replace driver path management with Selenium Manager. Remove find_element_by_* (Python) and findElementByX (Java). Run the suite twice in CI and fix the timing bugs stricter W3C behaviour exposes.
20.How do you scroll to an element?
Usually you do not; Selenium scrolls before interacting. When needed: scrollIntoView({block:'center'}) via JavaScript to avoid sticky headers, or Actions.scrollToElement (Selenium 4.2+) for real wheel events. For infinite scroll, loop scrolling to the bottom and wait for the item count to grow, with a cap.
21.How does Selenium Manager behave in CI, and how do you keep it reproducible and fast?
On each new session it checks for a matching driver on the PATH or in its cache (~/.cache/selenium) and downloads one if needed, plus the browser itself when you request a version that is not installed. For reproducibility, set browserVersion on the Options so every run uses the same Chrome for Testing build. For speed, cache ~/.cache/selenium between jobs or bake the browser and driver into the CI image, which also covers offline runners. Since 4.52 it validates TLS certificates, so runners behind a TLS-intercepting proxy need the corporate root trusted rather than relying on the insecure opt-in.
ChromeOptions options = new ChromeOptions();options.setBrowserVersion("stable"); // or a pinned major such as "128"WebDriver driver = new ChromeDriver(options);22.How do you wait for a loading spinner to disappear before continuing?
Use an explicit wait for invisibility, not for the next element's presence, because the next element may already be in the DOM behind the overlay. invisibilityOfElementLocated returns true when the element is hidden or removed, which handles both implementations. If the spinner sometimes appears late, first wait briefly for it to appear (ignoring a timeout), then wait for it to go, otherwise the invisibility check can pass before loading even starts.
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(15));wait.until(ExpectedConditions.invisibilityOfElementLocated(By.cssSelector("[data-testid='spinner']")));23.How do you automate a custom dropdown that is not a native <select>?
The Select class only works on real <select> elements, so a JavaScript combobox has to be driven like a user would: click the trigger, wait for the listbox to be visible, then click the option by its visible text or role. Scope the option locator to the open listbox, because many component libraries render all their popups at the end of <body>. Finally assert the trigger now shows the chosen value.
driver.findElement(By.cssSelector("[data-testid='country']")).click();WebElement option = new WebDriverWait(driver, Duration.ofSeconds(5)).until( ExpectedConditions.elementToBeClickable( By.xpath("//*[@role='listbox']//*[@role='option'][normalize-space()='Canada']")));option.click();24.How do you run the same tests locally and on Selenium Grid?
Create the driver in one factory that reads configuration: if a Grid URL is set, build a RemoteWebDriver with the same Options object; otherwise create a local driver. The test code never knows the difference. Keep browser choice, version and Grid URL in environment variables or config so CI can switch targets without code changes.
def make_driver(): options = webdriver.ChromeOptions() grid = os.getenv("GRID_URL") if grid: return webdriver.Remote(command_executor=grid, options=options) return webdriver.Chrome(options=options)25.How do you run Selenium tests in Docker in CI?
Either run the browser in a container (selenium/standalone-chrome, or a full Grid via docker compose) and point RemoteWebDriver at it, or let Testcontainers start a fresh browser container per test class from the test code. Give Chrome enough shared memory (shm_size of 2 GB or more) to avoid crashes, wait for the Grid status endpoint to report ready before tests start, and pin image tags to the Selenium version you use. Images are published on Docker Hub and mirrored to ghcr.io/seleniumhq.
26.Why does drag and drop sometimes fail, and how do you make it work?
Actions.dragAndDrop synthesises low-level pointer events, which work for libraries that listen to mouse events. Native HTML5 drag and drop uses the dragstart/drop event model and historically did not respond to synthesised pointer moves in every browser, so the action appears to do nothing. First try a slower manual sequence (clickAndHold, moveByOffset in steps, moveToElement, release). If the app uses HTML5 DnD and that still fails, dispatch the drag events with a small JavaScript helper and verify the result through the UI.
new Actions(driver) .clickAndHold(source) .moveByOffset(10, 0) .moveToElement(target) .pause(Duration.ofMillis(200)) .release() .perform();27.How do file uploads work when the browser runs on a remote Grid Node?
sendKeys on an <input type=file> passes a file path, but on a remote Node that path refers to the Node's file system. Selenium solves this with a file detector: in Java set LocalFileDetector on the RemoteWebDriver, and the client uploads the local file to the Node before typing the remote path. Python's Remote driver uses a local file detector by default; in JavaScript call driver.setFileDetector(new remote.FileDetector()). Never try to click the OS file dialog; it is outside the browser and WebDriver cannot see it.
((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector());driver.findElement(By.cssSelector("input[type=file]")) .sendKeys(Path.of("src/test/resources/avatar.png").toAbsolutePath().toString());28.When should you use JavascriptExecutor, and when is it a smell?
It is the right tool for reading state the WebDriver API does not expose (scroll position, localStorage, performance timings), for setting up state quickly, and for rare cases where a real interaction is impossible. It is a smell when it replaces user interactions, for example executing element.click() to get past ElementClickInterceptedException: the script ignores overlays, disabled states and visibility, so the test passes while users are blocked. If you reach for it to fix a failure, first find out what a user would see.
Long scrollY = (Long) ((JavascriptExecutor) driver).executeScript("return window.scrollY;");29.What is a component object and when do you introduce one?
A component object is a page object for a reusable piece of UI, such as a header, a date picker or a data table, scoped to a root element. Pages then compose components instead of duplicating their locators and methods. Introduce one when the same widget appears on several pages or several times on one page; searching from the component's root element also stops locators accidentally matching another instance elsewhere on the page.
public class DataTable { private final WebElement root; public DataTable(WebElement root) { this.root = root; } public List<String> column(String header) { /* search within root only */ }}30.How do you read a value from a table row identified by its content?
Locate the row by a unique business value rather than its index, then locate the cell by column. Row position changes with sorting, paging and new data. XPath handles this well: select the tr that contains a td with the key value, then read the cell at the index of the header you need, computed from the header text. Wrap it in a component object if tables appear across the app.
By row = By.xpath("//table[@id='users']/tbody/tr[td[normalize-space()='ana@example.com']]");String status = driver.findElement(row).findElement(By.xpath("./td[4]")).getText();31.What breaks when a Java project upgrades to Selenium 4.51, and how do you fix it?
4.51 removed the Java client's dependency on Guava, and ExpectedCondition now extends only java.util.function.Function. Code that passes conditions to wait.until or uses lambdas keeps working. Code that declared conditions as com.google.common.base.Function stops compiling, and so does any code that imported Guava classes while relying on Selenium to bring Guava in transitively. Fix the types to ExpectedCondition or java.util.function.Function, replace Guava helpers with JDK equivalents such as List.of, or declare Guava as a direct dependency if you really use it.
// Before (fails on 4.51)com.google.common.base.Function<WebDriver, WebElement> c = ExpectedConditions.visibilityOfElementLocated(by);// AfterExpectedCondition<WebElement> c = ExpectedConditions.visibilityOfElementLocated(by);32.How do you send keyboard shortcuts like Ctrl+C / Cmd+C that work on every OS?
The modifier differs by platform: COMMAND on macOS, CONTROL on Windows and Linux. Detect the platform of the browser, not of the test runner, because a Mac laptop can drive a Linux Grid Node; reading navigator.platform via JavaScript or the session's platformName capability works. Then send the chord with the Actions API, pressing and releasing the modifier explicitly. For clipboard assertions, paste into an input and read its value instead of reading the OS clipboard.
Keys mod = platformIsMac ? Keys.COMMAND : Keys.CONTROL;new Actions(driver).keyDown(mod).sendKeys("a").sendKeys("c").keyUp(mod).perform();Senior: Architecture and Strategy
Questions for senior SDET and lead roles. Interviewers want trade-offs, real examples, and awareness of where the ecosystem is going.
1.Selenium or Playwright for a new project? Defend your answer.
It depends on four things: team language, browser and device matrix, existing infrastructure, and wait discipline. A Java or C# team with a Grid and Safari or mobile requirements gets more from Selenium: vendor-maintained drivers, W3C standard, Appium reuse, Kubernetes-scale Grid. A TypeScript team starting fresh with Chromium-first needs benefits from Playwright's speed, auto-wait and integrated runner. In 2026 Playwright leads new-project surveys, Selenium leads installed base and breadth. The transferable asset is test design, so I would choose by team fit and keep page objects and data strategy portable.
2.What is WebDriver BiDi and how has it changed your suites?
A W3C bidirectional protocol over a WebSocket alongside classic WebDriver, letting the browser push events and accept interception commands. Practically: every test now fails on uncaught JavaScript errors, basic auth is one line, third-party requests are blocked for speed, API responses are mocked for empty and error states, and a network-idle wait replaced sleeps after API-triggering actions. It works across Chrome, Edge and Firefox, unlike CDP, and Selenium 5 removes CDP-only paths.
3.When would you still use CDP?
Performance metrics from the Performance domain, some Chromium-only emulation, and older suites that already isolate CDP calls. I would send raw commands by name rather than versioned typed modules, keep them behind an interface with a BiDi implementation next to it, and pin the Chrome version in CI so the DevTools package and browser move together.
4.Describe a flaky test you fixed and the method you used.
The answer should follow the method: classify from evidence (timing, state, order, environment, product bug), reproduce deliberately with repetition and CPU or network throttling, fix the root cause with the right wait or isolation, verify with hundreds of runs, and remove the quarantine tag. A strong example includes the wrong wait condition, the correct one, and a product bug found along the way.
5.How would you scale a suite from 200 to 2,000 tests?
Measure first: commands and wait time per test. Skip UI login and setup via cookies and APIs. Remove sleeps, zero the implicit wait, use eager page load, block third-party traffic. Then parallelise with a thread-safe driver factory, shard by historical duration across CI jobs, and run browsers on a Grid, ideally Dynamic Grid on Kubernetes with failure-only video. Finally shrink: push validation logic down to unit and API tests and keep Selenium for journeys only.
6.Explain Selenium Grid 4 architecture and what changed in 2026.
Router (entry), Session Queue, Distributor (matching), Session Map, Event Bus (ZeroMQ) and Nodes. In 2026: Grid 4.41 added a native Kubernetes session factory that provisions Pods per session without Docker, a session event API tests can fire, and event-driven video with failure-only upload; 4.44 and 4.45 made the Distributor, Session Map and Queue Redis-backed for high availability; Traefik replaced NGINX in the Helm chart; images are mirrored to GHCR.
7.Page Objects versus Screenplay: when do you switch?
Page Objects are right for most suites and small teams. Symptoms that justify Screenplay: page classes with dozens of methods, compound methods crossing pages, several teams contributing, and multi-actor scenarios. Screenplay's composition (tasks of interactions, questions for state) scales and reports better but costs ceremony. Migrate incrementally: wrap existing page objects as interactions and write new features in Screenplay.
8.How do you decide what to test with Selenium versus lower layers?
Apply the pyramid honestly: form validation rules and business logic belong in unit tests; API contracts in API tests; Selenium covers journeys and integration points that only a browser exercises (navigation, rendering, JavaScript interaction, auth flows). Review quarterly and delete browser tests that duplicate lower coverage and have never failed. Keep a small smoke set per commit and the full set nightly.
9.How do you use AI in a Selenium suite responsibly?
Generate page objects and test skeletons from real DOM with a prompt that states locator policy and shows an existing page object, then review as a pull request. Self-healing locators only with every heal logged and fixed in source. Visual AI for noise reduction in screenshot diffs at stable states. LLM triage over an evidence bundle (screenshot, page source, console, network) collected via BiDi. Autonomous test generation stays exploratory, not in the regression suite.
10.Design a cross-browser strategy for Chrome, Firefox, Edge, Safari and mobile.
Self-hosted Grid (Docker or Kubernetes) for the bulk Chrome runs on every pull request; a cloud vendor for the nightly matrix including real Safari on macOS and real iOS and Android via Appium. One driver factory with vendor-prefixed options, tunnels for private environments, results marked from teardown. BiDi for logs and interception where the vendor supports it; test IDs and ARIA-based locators so the same page objects hold across engines.
11.What do you monitor on a Grid in production?
Queue length (drives autoscaling), slot utilisation, session creation latency, session failures by reason, node health, and per-command latency via OpenTelemetry tracing. Structured JSON logs to Loki or Elasticsearch. Alerts on queue age and on nodes stuck in draining. Video and assets storage growth, mitigated with failure-only upload.
12.How would you handle a WebAuthn or passkey login flow?
Add a virtual authenticator to the session (CTAP2, internal transport, resident keys, user verified) so the browser answers WebAuthn prompts without a dialog. Register through the UI to test sign-up; seed a credential with a known key to test sign-in; flip isUserVerified to test failure paths. Safari lacks the API, so cover it differently.
13.Explain how you keep locators stable across a redesign.
Negotiate test IDs on interactive elements with a naming convention enforced in code review. Prefer ids and names, then ARIA attributes, then product text for critical labels. Ban absolute XPath, styling classes and indexes in review. Keep locators in page objects, verify uniqueness while writing, and scope searches to containers. A redesign then becomes a page-object diff, not a test rewrite.
14.What are the runtime floors and notable removals a team upgrading to Selenium 4.52 must know?
Java 11 minimum (Java 8 ended at 4.13), Python 3.10 minimum (3.9 ended at 4.37), .NET packages strongly signed and async since 4.41 and 4.44, Firefox CDP removed in 4.29, Java's deprecated logging classes removed in 4.45, Python's FirefoxBinary removed in 4.40, Java's se/files/{fileName} endpoint removed in 4.49, Firefox profile extension methods removed in all bindings in 4.50 (use installAddon or BiDi), and Guava dropped from the Java client in 4.51 so ExpectedCondition is a plain java.util.function.Function. The upgrade path is to the latest 4.x directly, then fix capabilities and timeouts.
15.How do you mock backend states in end-to-end tests without a mock server?
BiDi network interception: intercept the endpoint at beforeRequestSent and provideResponse with the status and body for the empty, error or edge-case state. Record real responses first so mocks match the contract, remove intercepts between scenarios, and keep one unmocked test per endpoint against the real backend.
16.How do you keep CI-only flakiness out of the suite?
Explicit window size, pinned browser via Selenium Manager, adequate shared memory in containers, fonts installed, parallelism sized to resources, deterministic sharding, and Selenium Manager cache warmed. Treat CI-only failures as timing bugs masked by fast laptops, not as noise. Never blanket-retry.
17.What would your first month look like inheriting a 1,500-test legacy suite?
Week one: get it running in CI with evidence on failure and measure duration and flakiness per test. Week two: quarantine the worst offenders with a deadline, fix the driver factory and thread safety, zero the implicit wait. Week three: cookie-based login, remove sleeps, block third parties, enable BiDi error capture in a base class. Week four: shard and parallelise, delete duplicated coverage, publish a dashboard. Communicate the plan and the numbers each week.
18.How does Selenium's governance differ from Playwright's and why does it matter?
Selenium is a Software Freedom Conservancy project implementing W3C standards; browser vendors ship the drivers. Playwright is a Microsoft project that ships patched browser builds and its own protocol. For enterprises this affects longevity risk, standards alignment, and how compatibility is guaranteed when browsers update every two weeks.
19.Describe how you would test an Electron desktop application.
Electron embeds Chromium, so chromedriver drives it. Selenium 4.45 Java added ElectronOptions and ElectronDriver; in other bindings set ChromeOptions.setBinary to the app executable and use a chromedriver matching the embedded Chromium. Same page objects, locators and waits apply.
20.What is your position on test retries?
Retries make a flaky suite look green and remove the signal needed to fix it. If used at all: only on tests tagged flaky, with retry counts reported as a metric, never on tests with side effects on shared state, and with a deadline to fix or delete the test.
21.How would you run Selenium Grid on Kubernetes, and what are the trade-offs?
Use the official Helm chart: the Router, Distributor, Session Map and Session Queue run as deployments, and browsers run either as autoscaled Node deployments or, since 4.41, as one Pod per session via the KubernetesSessionFactory. Pod-per-session gives perfect isolation and clean video per test but pays a Pod start-up cost on every session, so image pull policy, node pools and pre-pulled images matter. Static or autoscaled Nodes start sessions faster but can leak state between tests if browsers are reused. For high availability, the Distributor can be Redis-backed (since 4.44). Instrument queue length and session wait time, because those, not CPU, tell you when to scale.
22.Your team wants AI coding agents to write Selenium tests. How do you set that up so quality goes up, not down?
Give the agent current knowledge and hard rules. Point it at https://www.selenium.dev/llms.txt and the docs examples, and put rules in AGENTS.md or CLAUDE.md: if an API is not in the current docs it does not exist; use the project's page objects and driver factory; no sleeps; locator priority order. Let the agent drive a real browser to discover locators instead of guessing from source. Then hold its output to the same gates as humans: code review, a lint rule that bans sleeps and absolute XPath, and a requirement that new tests pass repeatedly before merge. The selenium.dev guidance explicitly warns against letting agents 'fix' flakiness with sleeps.
# AGENTS.md (excerpt)- Selenium 4.52, Java 17. Use only APIs shown in current selenium.dev docs.- Create drivers only via DriverFactory. Never use Thread.sleep.- Locators: data-testid > id/name > role/label text > CSS > XPath. No absolute XPath.- A new test must pass 10 consecutive runs locally before you open a PR.23.What is your policy for keeping Selenium and browsers up to date?
Browsers update every few weeks (Chrome moved to two-week releases in 2026), so a frozen client drifts out of step and produces flakiness that looks like test bugs, which is exactly what the Selenium project's 2026 PSA warned about. I schedule a client upgrade review at least quarterly, read the release notes for removals (for example the Guava removal in 4.51 or the Firefox profile methods removed in 4.50), and upgrade on a branch that runs the full suite. Browser versions are pinned via browserVersion so upgrades are deliberate, and a nightly job runs against the latest stable browser to catch breakage early. Dependency bots open the PRs; humans own the review.
24.How are you preparing a suite for Selenium 5?
Selenium 5 is not released; an alpha is planned and the stated direction is removing CDP-only paths in favour of WebDriver BiDi. So the preparation is reducing CDP coupling now: move console capture, network interception and auth to the BiDi APIs, keep any remaining CDP use behind one adapter so it can be swapped, and stop relying on deprecated APIs flagged in release notes. Staying on current 4.x releases is the cheapest preparation, because each one removes deprecations in small steps instead of one big jump.
25.How would you build accessibility testing into a delivery pipeline?
Layer it. Run an automated rules engine such as axe-core in Selenium tests on key pages and states (including modals and error states), failing on new serious and critical violations. On legacy pages, record existing violations as a baseline and ratchet it down so you block regressions without blocking every build. Add scripted keyboard-navigation checks for critical flows, and keep manual screen-reader testing for releases, because rule engines only catch a minority of real accessibility issues. Report violations with rule ids and selectors so developers can fix them without rerunning anything.
26.How do you make visual regression testing sustainable at scale?
Most visual suites die from noise, so control the environment first: pinned browser and fonts in a container, fixed viewport, animations disabled, and dynamic regions masked. Prefer component or element screenshots over full pages so a change in one area does not fail unrelated checks. Make baseline approval a normal part of code review, with an owner per area. Run a focused set per pull request and broad sweeps across viewports and browsers nightly, and track the false-positive rate as a health metric.
27.How do you manage test data for a large parallel end-to-end suite?
Every test creates the data it needs, through APIs or fixtures, with unique identifiers so parallel tests never collide, and does not depend on data another test left behind. Shared reference data is read-only and seeded once per environment. Expensive states are built through backend APIs rather than the UI, and rare states can be simulated with network interception. Clean-up is best-effort; tests must not rely on it. This removes order dependence, which is one of the biggest sources of flakiness at scale.
28.Would you build a wrapper framework over Selenium? Where do you draw the line?
A thin layer earns its keep: a driver factory, configuration, waiting helpers with good error messages, reporting hooks and page or component objects. A thick wrapper that re-implements click, type and find with its own retries and silent fallbacks hides failures, makes Selenium's documentation useless to the team, and ages badly as Selenium evolves. My rule is that the wrapper may add context and convenience, but never swallow an exception or change what an action means, and engineers can always drop to the raw WebDriver when needed.
29.Which metrics do you track to judge the health of a test suite?
Flake rate (tests that both pass and fail on the same commit), pass rate on the main branch, median and p95 duration of the PR pipeline, time from a red build to a fix, quarantine size and age, and the share of failures that turned out to be product bugs versus test or environment issues. Trend them weekly. A rising quarantine or a falling product-bug ratio tells you the suite is losing trust before people start ignoring it.
30.How do you design a framework that handles web components and shadow DOM cleanly?
Model each web component as a component object that owns its host locator and a method returning its shadow root, so tests never call getShadowRoot themselves. Inside a root, use CSS selectors only, since XPath from a shadow root is not supported in Chromium browsers. Nested components chain from parent to child root. Waits target the inner element, because components often render after the host appears. Since 4.50, Java and .NET relative locators can be anchored to shadow roots, which helps when internals lack stable attributes. Closed shadow roots are not reachable; agree test hooks with the component team.
public class LoginComponent { private final WebDriver driver; LoginComponent(WebDriver driver) { this.driver = driver; } private SearchContext root() { return driver.findElement(By.cssSelector("app-login")).getShadowRoot(); } public void signIn(String user, String pass) { root().findElement(By.cssSelector("#email")).sendKeys(user); root().findElement(By.cssSelector("#password")).sendKeys(pass); root().findElement(By.cssSelector("button[part='submit']")).click(); }}31.How would you test a product that is delivered as a browser extension?
Install the extension into the session at start-up rather than via a custom profile: Firefox's installAddon, Chrome's extension options, or the BiDi webExtension module, which several bindings gained in 2026 (Ruby in 4.50, JavaScript in 4.51, Python can install from the driver in 4.52). The deprecated Firefox profile extension methods were removed from all bindings in 4.50, so older setups need migrating. Then test the extension's pages and injected UI like any web page, and use BiDi events to observe what it does to network traffic and the console.
32.How do you secure a Selenium Grid that is shared across teams?
Never expose a Grid to the internet unauthenticated; anyone who can reach it can run a browser inside your network. Put the Router behind authentication and TLS, restrict network access so Nodes can only reach the environments under test, and keep secrets out of capabilities and logs. Make sure clients validate the Grid's certificate rather than disabling verification; Ruby raises on unverified Grid HTTPS certificates since 4.52, which is the right default. Use short session timeouts, per-session containers so no state leaks between teams, and keep the Grid images current with the base OS updates (Docker Selenium moved to Ubuntu 26.04 with 4.52).
Scenario Questions
Open-ended problems interviewers use to see how you think. There is no single right answer; the structure of the answer is what they grade.
1.A test clicks Save and asserts a success toast. It passes 95% of the time. Walk me through your investigation.
Collect evidence from failures: screenshot, console, network. If the toast is absent but the save succeeded, it is a timing bug: the toast appears and disappears within the polling window, or the assertion ran before the API returned. Reproduce with repetition and throttling. Fix by waiting for the durable signal (the saved value, the URL, a network response) rather than the transient toast, or lengthen the toast in test mode. If the save sometimes fails, it is a product bug: check the failed network request and file it.
2.The product team wants the full suite on every pull request but it takes 45 minutes. What do you do?
Measure per-test time and commands. Skip UI login via cookies. Remove sleeps and set eager page load. Block third-party requests. Parallelise with a thread-safe driver factory and shard across CI jobs by duration. Move validation tests down the pyramid. Define a 5-minute smoke set for pull requests and run the rest nightly and on merge. Report the before and after numbers.
3.Your suite must run on Chrome 118 for a regulated customer and on latest Chrome for everyone else. How?
Selenium Manager with browserVersion pinned to 118 in one CI job and 'stable' in another; it downloads Chrome for Testing builds and matching drivers. Or run Docker images tagged for each version on a Grid. Same test code, different configuration. Review the pin quarterly so the regulated run does not silently become obsolete.
4.Developers say the tests are 'too brittle' and want to stop writing them. How do you respond?
Quantify: which tests break, on which changes, and why. Usually locators tied to styling and structure. Propose test IDs with a naming convention, page objects so a change is one edit, and a review checklist for locators. Offer to pair on the next feature to show the cost is small. Agree metrics: locator-related failures per month.
5.A checkout test needs an order in 'shipped' state, which takes a warehouse job 24 hours to produce. How do you test it?
Do not wait for the job. Options in order: an API or database seed that creates a shipped order for the test user; a test-only endpoint the job exposes; BiDi network mocking of the orders endpoint to return a shipped state for the UI test. Keep one integration test in a nightly pipeline against a real shipped order.
6.The security team asks you to test that the app never leaks the session token into analytics requests. How?
Enable BiDi, observe every request with onBeforeRequestSent, and assert that no request to analytics hosts contains the token in URL, headers or body. Run it as part of the login journey test. Also block those hosts in normal tests for speed, but keep this one unblocked.
7.A new hire wants to add Thread.sleep(5000) 'just to be safe' before every assertion. What do you say?
Explain that it adds five seconds to every test unconditionally and still fails when the app is slower than five seconds. Show the explicit wait for the actual condition, and the network-idle or text-stable conditions for the hard cases. Add a lint rule or review check against sleep in test code.
8.Tests pass on macOS laptops and fail on Linux CI with layout-related errors. Diagnose.
Window size (headless default), missing fonts changing text width and wrapping, device pixel ratio, and browser version differences. Set an explicit window size, install fonts in the CI image or use the official Selenium images, pin the browser, and compare screenshots from both environments.
9.Leadership wants to 'add AI' to the test suite. What do you propose?
Three concrete, measurable pilots: assistant-generated page objects from real DOM with review, reducing authoring time; LLM triage over BiDi-collected evidence, reducing time to classify failures; visual AI on a handful of layout-critical pages. Explicitly exclude autonomous test generation from the regression suite and require logged, reviewed heals if self-healing is trialled.
10.Your Grid runs out of capacity every morning at 9 when all teams push. Options?
Autoscale: Dynamic Grid on Kubernetes with KEDA scaling Node deployments from queue length, capped by a max replica count and cluster budget. Shorter sessions via cookie login and session timeouts to free slots. Stagger schedules or prioritise pull-request smoke runs over full suites. Monitor queue age and alert.
11.A test needs to verify an email was sent after sign-up. Where does Selenium stop?
Selenium drives the browser; email is outside it. Use a test mail service or an API (Mailhog, Mailpit, a provider's sandbox) to fetch the message, extract the link or code, and continue the browser flow with it. Keep the browser part and the mail part in separate steps with clear failure messages.
12.You inherit tests that assert page text in five languages with hard-coded strings. Improve them.
Locate by test IDs and ARIA rather than text, and assert against the app's own translation resources loaded in the test, keyed by message id. Where text must be asserted, parametrise by locale from a data source. Run one locale per pull request and all locales nightly.
13.You upgrade the Java client to 4.51 and 30 files stop compiling. Walk me through it.
Read the 4.51 release notes first: the Java client no longer depends on Guava, and ExpectedCondition extends only java.util.function.Function. Group the errors. Variables or return types declared as com.google.common.base.Function become ExpectedCondition or java.util.function.Function; Guava predicates become java.util.function.Predicate (apply becomes test); collection helpers become List.of or Map.of. If parts of the code genuinely use Guava, add it as a direct dependency rather than downgrading Selenium. Do the migration on a branch, run the full suite, and add a note to the upgrade checklist so the next team is not surprised.
14.An AI coding agent opened a PR overnight with 40 new tests. Many use sleeps and absolute XPath. What do you do?
Do not merge it, and do not fix 40 tests by hand. Treat it as a process failure: the agent lacked rules. Add an AGENTS.md or CLAUDE.md with the project's conventions (driver factory, page objects, locator priority, no sleeps, only APIs in current docs), point the agent at the selenium.dev llms.txt and docs examples, and let it drive a real browser to find locators. Add CI checks that reject sleeps and absolute XPath, and require new tests to pass repeated runs. Then ask the agent to regenerate a few tests and review them closely before scaling up.
15.Overnight, every test on the CI runners fails with SessionNotCreatedException. Nothing in the repo changed. Diagnose.
Something outside the repo changed, most often the browser auto-updated on the runner image while a driver was pinned. Check the exception message for the browser and driver versions. If the project ships a chromedriver binary or sets a driver path, remove it and let Selenium Manager resolve the driver. Also check whether the Selenium client is old enough not to know the new browser well. For the future, pin browserVersion so browser updates are deliberate, run a nightly job against latest stable to catch this before it hits PRs, and keep the client on a regular upgrade cadence.
16.After upgrading to 4.52, Selenium Manager fails behind the corporate proxy with certificate errors. What do you do?
4.52 made Selenium Manager validate TLS certificates, which is correct behaviour. A TLS-intercepting corporate proxy presents its own certificate, so the fix is to trust the corporate root CA on the runners (and, for Python, use an up-to-date certifi, since trust roots changed after the eMudhra distrust). The opt-in insecure mode exists but should be a documented, temporary exception, not the fix. The more robust long-term answer for locked-down networks is to pre-install browsers and drivers in the CI image or use an internal mirror, so tests do not download anything at run time.
17.A redesign moved login into a web component and 300 tests now fail with NoSuchElementException. How do you respond?
It is one failure, not 300: every test goes through login. Confirm in DevTools that the fields are now inside a shadow root. Fix it once in the login page object: find the host, call getShadowRoot, locate the inputs with CSS selectors, and wait for the inner input because the component renders asynchronously. Rerun the suite to confirm that only login was affected. Then talk to the design system team about stable test hooks (part attributes or data-testids inside components) and whether any roots are closed, because WebDriver cannot reach closed roots.
18.An export test passes locally but always fails on Selenium Grid. Why, and how do you fix it?
On Grid the browser saves the file on the Node, not on the machine running the test, so checking a local Downloads folder can never work. Enable managed downloads: request se:downloadsEnabled in the Options (and enable it on the Nodes), wait until the file appears in the session's downloadable files, then download it to the test machine and assert on its contents. Do not use the old per-file GET endpoint, which was removed from Java in 4.49. Locally, use a per-test download directory and wait for the complete file instead of sleeping.
options.enable_downloads = Truedriver = webdriver.Remote(command_executor=GRID_URL, options=options)# ... trigger export ...WebDriverWait(driver, 30).until(lambda d: "report.csv" in d.get_downloadable_files())driver.download_file("report.csv", str(tmp_path))19.Leadership asks for accessibility testing in place within two weeks. What do you propose?
Be clear about what two weeks can and cannot deliver. Week one: add axe-core scans to the existing Selenium tests for the top ten user journeys, run them in CI, and publish the current violations as a baseline with severity. Week two: fail builds on new serious and critical violations, add keyboard-only checks for login and checkout, and hand developers a report with rule ids and selectors. Then state plainly that automated checks catch only part of the problem, and schedule a manual audit with screen readers for the critical flows.
20.Your Kubernetes Grid queues sessions for minutes while the cluster has spare capacity. Investigate.
Start at the queue: are requests waiting because no stereotype matches (a capability typo such as a browserVersion nobody provides) or because slots are slow to appear? Check Distributor logs for rejected matches. With pod-per-session, look at Pod start-up: image pull time, pending Pods due to resource requests that do not fit node sizes, and node autoscaler lag. With autoscaled Nodes, check the scaler's trigger thresholds and cooldowns. Fixes include pre-pulling images, right-sizing requests, a warm minimum of Nodes before the morning peak, and alerting on queue wait time rather than cluster CPU.
21.A test fails only when the page contains a third-party chat widget that loads slowly. You do not control the widget. What do you do?
Decide what the test is for. If it is testing your checkout, the widget is noise: block its domain with BiDi network interception (or a hosts rule in the test environment) so it never loads, and keep one separate test that verifies the widget integration. If the widget overlaps your buttons when it does load, that is a real user problem worth reporting, not hiding. Either way, do not add sleeps; and do not switch to JavaScript clicks to get past the overlay.
22.A team lead wants to rewrite the whole Selenium suite in Playwright this quarter. How do you evaluate the proposal?
Start from the problem they want solved. If the pain is flakiness, slow runs or poor debugging, measure where it comes from; most of it usually follows the test design (waits, data, locators) and would move with the tests. Then compare costs honestly: rewrite effort, retraining, language and browser coverage (Selenium covers real Safari and many languages; Playwright ships patched browser builds), Grid and cloud investments, and the BiDi features Selenium has added since 2024. A sensible path is a time-boxed pilot on one new area with agreed success metrics, rather than a big-bang rewrite that freezes coverage for a quarter.
Live coding tasks
Senior interviews usually include two or three hands-on tasks. Practise on these debugging challenges first. Each has progressive hints and a reference solution.
- Fix the Flaky Login Test beginner · 10 min
- Stale Elements in a Delete Loop intermediate · 15 min
- Replace Brittle Locators beginner · 10 min
- The Payment iFrame Bug intermediate · 10 min
- The 30-Second Negative Check intermediate · 10 min
- Extract a Page Object intermediate · 20 min
- The Wrong Tab intermediate · 10 min
- Tests Interfere When Run in Parallel advanced · 20 min
- The Dropdown That Is Not a Select beginner · 10 min
- Catch the JavaScript Error the Test Missed advanced · 15 min
- Find the Row by Its Content, Not Its Position beginner · 10 min
- Wait for the Download, Not the Clock intermediate · 20 min
- Reach the Input Inside the Shadow Root intermediate · 15 min
- Replace Every Sleep with a Real Wait beginner · 15 min
- Survive the Guava Removal in Selenium 4.51 intermediate · 15 min
How to use this page
- Answer out loud first. Open the answer only after you have said yours. Interviews test recall under pressure, not recognition.
- Bring examples. Every senior answer should include one concrete story from a real suite: a flaky test you fixed, a grid you scaled, a migration you led.
- Know the modern landscape. Expect to be asked why you would choose Selenium over Playwright, what BiDi changes, and how you use AI tools responsibly. The Selenium 4, BiDi & Beyond chapter covers exactly that.
- Test yourself. The quizzes track your best score per topic so you can see where to revise.