SeleniumHQ / SeleniumHQ/selenium
[🐛 Bug]: Async methods cannot be easily recognized
- Dominant language
- Java
- Stars
- 34.5k
- Forks
- 8.7k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 92
Description
### What happened?
We cannot easily understand whether a method is asynchronous or not. When we write code, we use synchronous methods and asynchronous beside. There is high chance to make a mistake when dealing with async methods, and don't await them.
Example:
```csharp
driver.Network.StartMonitoring();
```
Who knows it's async or not. Tooling (like IDE) doesn't help us (at least for me) to understand, there is even no warnings.
Even Jim made a mistake:

I also went through open issues in this repository and observed that people don't await `StartMonitoring()` method.
# Solution
Add `Async` to all async methods according [naming convention](https://learn.microsoft.com/en-us/dotnet/csharp/asynchronous-programming/task-asynchronous-programming-model#BKMK_NamingConvention).
> By convention, methods that return commonly awaitable types (for example, Task, Task, ValueTask, ValueTask) should have names that end with "Async".
### How can we reproduce the issue?
```shell
driver.Network.StartMonitoring();
```
### Relevant log output
```shell
no output
```
### Operating System
any
### Selenium version
any dotnet, selenium 4.0+
### What are the browser(s) and version(s) where you see this issue?
any
### What are the browser driver(s) and version(s) where you see this issue?
any
### Are you using Selenium Grid?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.