SeleniumHQ / SeleniumHQ/selenium
[🚀 Feature]: [dotnet] Small step forward to Async
- Dominant language
- Java
- Stars
- 34.5k
- Forks
- 8.7k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 92
Description
### 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
```csharp
var driver = new ChromeDriver();
```
### Proposal:
```csharp
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?
```csharp
var driver = new ChromeDriver();
await driver.StartAsync();
```
Better:
```csharp
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.
Contributor guide
Assessment
This issue has not been assessed yet.