SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.2k stars 8.11k forks source link

[🚀 Feature]: extend interface HttpHandler with `executeAsync` method #14403

Open joerg1985 opened 1 month ago

joerg1985 commented 1 month ago

Feature and motivation

This will allow to write none blocking methods in the backend without spawning threads in these places and handle this, e.g. Node.touchSessionAsync.

Usage example

Everytime a websocket message is proxied between the node and the driver the implementation waits until the session map has performed the touch to keep the session alive. This delay could be removed by touching the session async.

When BiDi is in place and alot of websocket message are proxied this might get a bottleneck in interception of network traffic or other frequent browser events.

joerg1985 commented 1 month ago

I could create a PR for this in case you think this makes sense, but i do not want to waste time on it in case you think this is not needed.

github-actions[bot] commented 1 month ago

@joerg1985, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

diemol commented 4 weeks ago

Thank you, @joerg1985. This makes sense.

github-actions[bot] commented 4 weeks ago

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.

joerg1985 commented 4 weeks ago

I have create a PR for this with one change, i have extended the HttpClient interface. The HttpHandler is used in a lot of areas that do not benefit from this change.