Selenium Architect Interview Questions: Grid, BiDi (2027)

36 architect-level Selenium interview questions: Grid 4 components, Selenium Manager, BiDi, waits, page objects and flaky tests.

Sep 27, 2025 - 17:43
Nov 11, 2026 - 06:21
 0  56
Selenium Architect Interview Questions: Grid, BiDi (2027)

Selenium architect interview questions go beyond locators and waits. You are asked to design a Grid for parallel runs, explain how Selenium Manager finds drivers, choose between WebDriver BiDi and CDP, structure page objects, and stop flaky tests from blocking a pipeline. This page has 36 questions with direct answers, checked against selenium.dev in November 2026.

Key takeaways

  • Grid 4 has six components: Router, Distributor, Session Map, New Session Queue, Node and Event Bus. Know what each one does and which deployment mode you would pick.
  • Selenium Manager ships with Selenium from version 4.6, finds a matching driver and caches it, and can also download browsers from 4.11.0.
  • Selenium's documentation says not to mix implicit and explicit waits. The default implicit wait is 0.
  • Page objects expose what a page lets a user do, keep locators private and, in general, leave assertions to the test.
  • WebDriver BiDi is the W3C bidirectional protocol and is switched on with the webSocketUrl capability.
  • The latest stable Selenium release on the downloads page when this was checked was 4.52.0, published on 29 October 2026.

How to use this guide

This page is the architect-level companion to our other Selenium posts. For fundamentals start with the 100+ Selenium interview questions. For incident-style cases see Scenario-Based Selenium Interview Questions, and for flaky-test debugging read Most Asked Selenium Interview Questions: Debugging. Framework-building questions are in Real-Time Selenium Interview Questions: Frameworks, and the general advanced set is Advanced Selenium Interview Questions.

TopicQuestionsWhat to practise
Grid architecture and deployment1 to 12Run standalone, then hub and node, on two machines
Drivers, browsers and protocols13 to 20Run Selenium Manager with --debug and read the output
Waits, locators and stability21 to 29Replace sleeps with explicit waits in one suite
Framework design and CI30 to 36Draw the layers of your framework on one page

Grid architecture and deployment

1. What are the components of Selenium Grid 4?

Six: Router, Distributor, Session Map, New Session Queue, Node and Event Bus. Together they accept session requests, queue them, find a Node with a matching browser slot, start the session and route later commands to the right machine.

2. What does the Router do?

It is the entry point of the Grid. It receives all external requests and forwards them. New session requests go to the New Session Queue, while requests for an existing session go to the Node found through the Session Map.

3. What does the Distributor do?

It registers Nodes and tracks their capabilities. It polls the New Session Queue, finds a suitable Node for each pending request, creates the session and records the session-to-Node mapping in the Session Map.

4. What is the Session Map for?

It is a data store that maps each session ID to the Node running that session. The Router reads it to send each command to the right place.

5. How does the New Session Queue behave under load?

It holds new session requests in first-in, first-out order, with a configurable request timeout and retry interval. When all slots are busy, requests wait in the queue instead of failing immediately, so your CI sees longer start times first and timeouts only when the wait exceeds the setting.

6. What does the Event Bus do?

It is the communication path between Nodes, the Distributor, the New Session Queue and the Session Map. It passes internal messages to reduce HTTP calls. In fully distributed mode it starts first.

7. Which deployment modes does Grid 4 offer?

Standalone (everything in one process), hub and node (the most common mode for several machines), and distributed (each component runs separately, ideally on different machines). Choose by scale: standalone for a developer laptop, hub and node for most teams, distributed when you need to scale or isolate individual components.

8. What commands start standalone and hub-and-node modes?

java -jar selenium-server-<version>.jar standalone

java -jar selenium-server-<version>.jar hub
java -jar selenium-server-<version>.jar node --hub http://<hub-ip>:4444

Replace <version> with the release you downloaded, for example 4.52.0 on the date this was checked.

9. What default ports should you know?

4444 for the Router, Hub and Standalone, where the Grid UI is also served. 5555 for a Node. In distributed mode the docs list 4442, 4443 and 5557 for the Event Bus, 5559 for the New Session Queue, 5556 for the Session Map and 5553 for the Distributor. If you run more than one Node on a machine, give each its own port.

10. How many sessions can a Node run?

By default a Node registers drivers it finds on its path and creates one slot per CPU for Chromium-based browsers and Firefox, and one slot for Safari. Running more browsers than the machine can handle makes tests slow and flaky, so size Nodes by CPU and memory.

11. How would you size a Grid for a nightly suite?

Measure first: the number of tests, the average test time and the time you can afford. Divide total test minutes by the target window to get the parallel sessions you need, then add headroom, because queued requests and browser start-up add time. Confirm the Node has enough CPU and memory for that many browsers, and check the New Session Queue timeout against your worst-case wait.

12. A test fails only on the Grid, not locally. What do you check?

Browser and driver versions on the Node, screen size and headless settings, locale and timezone, file paths for uploads and downloads, and network access from the Node to the application. Compare the capabilities the test requests with what the Node reports in the Grid UI.

Drivers, browsers and protocols

13. What is Selenium Manager?

The official driver manager, written in Rust. It ships with each Selenium release from 4.6, and the language bindings use it as a fallback when you do not supply a driver. It detects the installed browser version, finds a matching driver version, downloads and unpacks it, and caches it in ~/.cache/selenium.

14. Can Selenium Manager install browsers?

Yes, since 4.11.0 it can download and cache browsers that are not installed locally. The docs list Chrome for Testing from 4.11.0, public Firefox releases from 4.12.0 and Edge from 4.14.0. On Windows, installing Edge needs administrator rights.

15. How do you see what Selenium Manager decided?

Run it with --debug.

./selenium-manager --browser chrome --debug

The output shows whether the driver was already on the PATH, which browser version it detected, which driver version it resolved, and the final driver and browser paths.

16. How do you configure Selenium Manager in a locked-down CI?

Settings come from CLI arguments, then the se-config.toml file in the cache folder, then environment variables, in that order of precedence. Variables use the SE_ prefix, for example SE_CACHE_PATH, SE_OFFLINE and SE_PROXY. Data collection is on by default and can be turned off with SE_AVOID_STATS=true.

17. What causes SessionNotCreatedException?

The docs list a driver and browser version mismatch, an operating system that blocks the driver, or a missing or non-executable driver file. Selenium Manager removes most version mismatches, so check for a pinned old driver on the PATH first.

18. What is WebDriver BiDi?

The W3C standard bidirectional protocol for browser automation. It adds a WebSocket connection so scripts can receive browser events, such as network requests, console messages and JavaScript errors, as they happen instead of only sending request and response commands.

19. How do you enable BiDi?

Set the webSocketUrl capability to true. In Java that is setCapability("webSocketUrl", true), in Python enable_bidi = True, and in JavaScript enableBidi().

20. How does BiDi relate to the Chrome DevTools Protocol?

Selenium's documentation presents BiDi as the cross-browser replacement for CDP, and describes CDP access as temporary until BiDi is implemented. For new work prefer the BiDi APIs for logging, network and scripts, and treat CDP code as something you may need to migrate.

Waits, locators and stability

21. What is the difference between implicit and explicit waits?

An implicit wait is a global setting applied to every element lookup in the session, and its default is 0. An explicit wait polls for a specific condition until it is true or a timeout is reached. Explicit waits are the better tool because they state what you are waiting for.

22. Why not mix them?

The docs say doing so can cause unpredictable wait times. Their example is an implicit wait of 10 seconds with an explicit wait of 15 seconds, which could time out after 20 seconds. Pick explicit waits and leave the implicit wait at 0.

23. Show an explicit wait.

Wait<WebDriver> wait = new WebDriverWait(driver, Duration.ofSeconds(2));
WebElement message = wait.until(
    ExpectedConditions.presenceOfElementLocated(By.id("message")));

Conditions that take a locator search for the element on every poll, so they also wait for it to appear.

24. What options does FluentWait give you in Java?

A timeout, a polling interval and exceptions to ignore, for example withTimeout(Duration.ofSeconds(2)), pollingEvery(Duration.ofMillis(300)) and ignoring(ElementNotInteractableException.class). Use it when the default polling or ignored exceptions do not fit a slow component.

25. What causes StaleElementReferenceException and how do you fix it?

An element goes stale when it was located earlier but cannot be accessed now: the DOM changed, you navigated, or you switched window or frame. Relocate the element before use, or wrap it in an object that re-locates it when stale. If the cause was a context change, switch back to the right window or frame instead.

26. What is the shadow DOM equivalent?

DetachedShadowRootException is the shadow root equivalent of a stale element, and the fix is to find the shadow host again. NoSuchShadowRootException means the element is not a shadow host or its shadow root is not attached yet.

27. Which locator strategies exist, and which do you prefer?

WebDriver supports eight: class name, CSS selector, id, name, link text, partial link text, tag name and XPath. Selenium also offers relative locators (above, below, left, right, near). Prefer stable ids or dedicated test attributes and CSS selectors, and keep XPath for cases CSS cannot express.

28. What does ElementClickInterceptedException mean?

Another element, such as a navbar or modal, covers the target. Wait for the covering element to go away, or scroll the target into view. Do not reach for a JavaScript click as the first fix, since it hides a real usability problem.

29. Which timeouts have defaults you should know?

The error documentation gives a script timeout default of 30 seconds and a page load timeout default of 300 seconds. A TimeoutException means an explicit wait or a page load exceeded its limit.

Framework design and CI

30. What belongs in a page object?

Public methods that represent what the page lets a user do, such as logging in, with locators and HTML structure hidden inside. If the UI changes, you edit one place. Methods can return another page object or this for chaining.

31. Should page objects contain assertions?

Generally no. Verification belongs in the test. The one accepted exception in the docs is a check in the constructor that the browser is on the expected page.

32. How do you model a failed login?

As a separate method that returns the login page again, for example loginAsExpectingError, next to loginAs that returns the home page. Different outcomes of the same action get different methods and return types.

33. Which practices does Selenium encourage for tests?

The encouraged list includes page object models, a domain specific language, generating application state, mocking external services, improved reporting, avoiding shared state, test independence, a fluent API and a fresh browser per test. Together they aim for tests that can run in any order and in parallel.

34. Which practices does it discourage?

The documentation lists captchas, file downloads, HTTP response codes, email and social logins, test dependency, performance testing, link spidering and two-factor authentication as things to avoid automating through the browser. Use APIs, test accounts or dedicated tools for those cases.

35. How would you stop flaky tests blocking a pipeline?

Find the cause first: a missing wait, shared state, a data race or an environment difference. Fix or quarantine the test, with an owner and a date, so it stops failing the main build while it is repaired. Do not blanket-retry everything, because retries hide real defects and double run time.

36. Draw the layers of an architect-level Selenium framework.

Test layer (what to verify), page and component objects (what the UI offers), driver factory (browser, capabilities and Grid URL), test data and state setup (APIs or fixtures instead of UI clicks), and reporting and CI integration. Keep each layer replaceable. Say which layer you would change first if the UI moved to a new framework: the page objects, not the tests.

Frequently asked questions

What is the difference between Selenium Grid 3 and Grid 4?

This page covers Grid 4 as documented on selenium.dev, with its six components. For what changed from Grid 3, read the release notes for the version you are moving from.

Do I need Selenium Manager if I already manage drivers?

No. The bindings use it only as a fallback when no driver is provided, so a driver you supply takes precedence.

Is Selenium enough for API testing?

No. Use it for browser behavior and prefer API-level tests for logic, so your UI suite stays small.

Should I move from CDP to BiDi now?

For new code, yes where the BiDi API covers your need. Check the logging, network and script sections of the docs, and keep CDP code isolated so it is easy to replace.

How many Selenium interview questions should I prepare?

Quality beats count. Be able to explain Grid, waits, locators, page objects and flaky-test handling with one example from your own work each.

Which language should I use for Selenium?

The one your team uses. Selenium has bindings for Java, Python, C#, Ruby, JavaScript and Kotlin, and the concepts transfer between them.

Where can I practise a CI pipeline that runs Selenium?

Build a small web project, a pipeline that starts a Grid and a test stage that runs against it. Our DevOps training in Pune covers Git, Jenkins and containers in labs, in a Kharadi classroom or live online.

Official references

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.