selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[🚀 Feature]: [dotnet] Small step forward to Async

Open nvborisenko opened this issue 9 months ago • 5 comments

Description

Nobody knows when Async https://github.com/SeleniumHQ/selenium/issues/14067 will be in place, and moreover how to do it smoothly without pain for end-users.

I propose to make small improvement now, even before v5.

Current

var driver = new ChromeDriver();

Proposal:

var driver = await ChromeDriver.StartAsync();

Have you considered any alternatives or workarounds?

In any case constructor cannot be async, we will rework it entirely. Ha, and it means everybody has to use another API.

I propose alternative approach here.

Bad?

var driver = new ChromeDriver();
await driver.StartAsync();

Better:

var driver = await ChromeDriver.StartAsync();

We can try to make it without breaking changes. Seems it is small step, but it contributes significantly. This is most tricky part of migration.

nvborisenko avatar Feb 11 '26 22:02 nvborisenko

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

Selenium Triage Team: remember to follow the Triage Guide

selenium-ci avatar Feb 11 '26 23:02 selenium-ci

@selenium-ci May I pick up this issue? Hope this project is open for contribution.

spider-yamet avatar Feb 18 '26 00:02 spider-yamet

Successfully migrated low-level parts to be async. Need to be done:

  1. [x] Make any WebDriver IAsyncDisposable (small breaking change for implementors): https://github.com/SeleniumHQ/selenium/pull/17119
  2. [ ] Waiting good decision on single entry for WebDriver configuration: https://github.com/SeleniumHQ/selenium/issues/17115. Otherwise we will have millions of method overloads.

nvborisenko avatar Feb 20 '26 10:02 nvborisenko

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Aug 19 '26 20:08 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Sep 02 '26 20:09 github-actions[bot]