SeleniumHQ / SeleniumHQ/selenium

[🚀 Feature]: Transition .NET to Async library

Open
#14,067 3 comments 5 reactions 0 assignees View on GitHub
A-needs decision C-dotnet I-enhancement
Dominant language
Java
Stars
34.5k
Forks
8.7k
Avg merge
2d 1h
Merged PRs (30d)
92

Description

### Feature and motivation

.NET libraries are increasingly moving to Async implementations. Selenium should move over to be a completely Asynchronous library, especially since we plan to implement current methods with BiDi that have to be Async.

It is possible to maintain backwards compatibility by implementing existing Synchronous methods by calling the Async methods wrapped in a Run Task, but this doubles the API surface, and is not best practice.

Proposal
1. Add Async methods to all classes
2. Rewrite Sync methods to use the Async methods
3. Write Blog Post talking about the proposed changes
4. Mark all Sync methods as deprecated

#14051 is an example of doing the first 2 items for the Navigation methods

Question:
1. Do we want to remove Sync methods for Selenium 5, knowing that Selenium 5 will be backwards incompatible with current Selenium code, or maintain both through Selenium 6?
2. Need an answer to #14065 as part of this

attn: @jimevans / @nvborisenko / @YevgeniyShunevych

### Usage example

```
await driver.FindElementAsync(By.Id("consoleLog"));
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.