Selenium WebDriver Client and Browser Driver Timeout Cancellation Across the Command Boundary
0 reputation · 13 Apr 2026, 14:06 UTC
Assuming Selenium 4.x and current browser driver releases, the client applies implicit wait, page-load timeout, and script timeout before forwarding commands to the browser driver. When a client-side timeout expires, the binding throws a TimeoutException and stops waiting for the driver response. The open question is whether that exception should be treated as a cancellation signal for the browser action still in flight.
Classic WebDriver does not define a standardized bi-di command to interrupt a running page load or script across all browsers. Browser drivers such as ChromeDriver, GeckoDriver, and SafariDriver may enforce independent command execution timeouts, so one side can report failure while the other continues or later reports success. Behavior also varies by language binding and driver version, and mixing implicit waits with explicit timeouts can produce compounded wait durations rather than a single deterministic cancellation point.
For a cross-browser test suite, the design decision is how to reconcile client-side timeout policy with driver-side execution state without assuming the browser operation has stopped. Should the client attempt to recover the session, or should the driver be configured to enforce a matching timeout? How can teams verify cancellation semantics for a specific driver version without relying on observed behavior from a different browser?