Skip to content

[🚀 Feature]: Configurable HTTP Client settings across bindings #12368

@titusfortner

Description

@titusfortner

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

Metadata

Metadata

Assignees

Labels

A-needs new ownerTLC has agreed to do this, but no one is assignedC-dotnet.NET BindingsC-javaJava BindingsC-nodejsJavaScript BindingsC-pyPython BindingsC-rbRuby BindingsI-enhancementSomething could be betterJ-staleApplied to issues that become stale, and eventually closed.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions