Testing / Selenium Interview questions
How does Selenium implement browser automation without a built-in interception mechanism (network mocking limitations)?
Classic Selenium WebDriver has no native way to intercept or mock network requests the way newer frameworks do - the W3C WebDriver protocol it's built on was designed around controlling the browser's UI and DOM, not its network layer.
Teams needing network mocking with Selenium typically reach for one of two workarounds: running an external proxy tool (like BrowserMob Proxy or a similar HTTP proxy) configured on the browser's proxy settings before launch, so traffic can be inspected or rewritten outside the browser entirely; or, since Selenium 4, using its newer BiDi (bidirectional) protocol support, which adds an event-driven channel alongside classic WebDriver commands and exposes some network-event visibility that wasn't previously available at all.
BiDi support is still comparatively new and narrower than what dedicated automation-first frameworks expose, so proxy-based mocking remains the more common and mature approach for teams with heavy network-stubbing needs in a Selenium suite today.
More Related questions...