-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
Status
Python: #13286 (partial)
Java:
Ruby:
JS:
.NET:
Feature and motivation
Update: Here's the example page describing client settings and what all examples need to be added and what features still need to be implemented: WIP - HTTP Client Documentation
I went down a rabbit hole of timeout settings in Selenium between the different bindings, and what the defaults are and what can be configured. Edit: added WebDriverIO for reference
| Language | Max Redirects | Read Timeout | Configurable |
|---|---|---|---|
| Python | 3 | ∞ | No |
| Ruby | 20 | 60 | Timeout, not redirects |
| Java | 100 | 180 | Timeout, not Redirects |
| .NET | 50 | 60 | No |
| JS | ∞ | ∞ | No |
| (WDIO) | 3 | 120 | Yes |
| recommended | 20 | 120 | Yes! |
According to Jari, Max Redirect should be 20.(93eee69)
It is also problematic that the default page load timeout is 300 when the read timeout in most languages is so much less (the driver will wait for the page long after the code errors and can't send a quit command). I'm not sure why it was set that high in the first place? I think we should change the defaults across the board to be 120 second read timeout and 115 second page load timeout.
Usage example
ClientConfig config = ClientConfig.defaultConfig().readTimeout(Duration.ofSeconds(300)).redirects(25).baseUrl(url)http_client = Selenium::WebDriver::Remote::Http::Default.new(timeout: 300, redirects: 25)client_config = ClientConfig()
client_config.timeout = 300
client_config.redirects = 25