SeleniumHQ / SeleniumHQ/selenium
[🚀 Feature]: implement namespacing methods as properties
- Dominant language
- Java
- Stars
- 34.5k
- Forks
- 8.7k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 92
Description
### Feature and motivation
.NET copied the Java approach of using methods for namespacing:
```
driver.Manage().Cookies().AddCookie(cookie)
```
When a more idiomatic way would be to use properties.
This came up when discussing adding the BiDi functionality. Rather than mixing them, or using the old way, I propose we add the properties and deprecate the methods.
### Usage example
```
driver.Manage.Cookies.AddCookie(cookie)
```
### Community Proposal
#### Cookies
`driver.Cookies`
```csharp
IReadOnlyList GetAll();
Cookie? Get(string name);
void Add(Cookie cookie);
void Delete(Cookie cookie);
void Delete(string name);
void DeleteAll();
```
#### Logs
`driver.Logs`
```csharp
IReadOnlyList GetAvailableTypes();
IReadOnlyList GetAll(string type);
```
Contributor guide
Assessment
This issue has not been assessed yet.