Skip to content

Commit 09533e7

Browse files
authored
Merge branch 'trunk' into rbe_eif
2 parents 60e17fa + 1a470d1 commit 09533e7

File tree

9 files changed

+132
-141
lines changed

9 files changed

+132
-141
lines changed
File renamed without changes.

dotnet/CHANGELOG

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -47,104 +47,104 @@ v4.30.0
4747
v4.29.0
4848
======
4949
* Add CDP for Chrome 133 and remove 130
50-
* [dotnet] [bidi] Add network SetCacheBehavior command (#15133)
51-
* [dotnet] Annotate nullability on devtools event args (#15134)
52-
* [dotnet] Annotate nullability for `DriverService` and chromium/safari services (#15101)
53-
* [dotnet] Add nullability to `Command` type (#15147)
54-
* [dotnet] Annotate nullable reference types on input devices (#14804)
55-
* [dotnet] Annotate nullability on `SendingRemoteHttpRequestEventArgs` (#15148)
56-
* [dotnet] Fix obvious code style formatting
57-
* [dotnet] Address some build warnings (#15157)
58-
* [dotnet] Enhance Print PageSize class to support for predefined well-known sizes (#15144)
59-
* [dotnet] Improve bidi exception when it is not enabled (#15163)
60-
* [dotnet] Annotate nullability on `DriverOptions` (#15167)
61-
* [dotnet] Annotate nullability on `ChromiumOptions` (#15173)
62-
* [dotnet] Annotate nullability on interactions (#15152)
63-
* [dotnet] [bidi] Use JsonSerializerContext to be AOT friendly (#15162)
64-
* [dotnet] Annotate nullability on chrome-based driver services (#15154)
65-
* [dotnet] Simplify and modernize `DevToolsDomains.InitializeDomains` (#15198)
66-
* [dotnet] Add nullability to Chromium configuration types (#15204)
67-
* [dotnet] Allow UTF-16 tolerant string converter as a dictionary key (#15203)
68-
* [dotnet] Fix webauth credential to allow nullable `rpID` (#15201)
69-
* [dotnet] [bidi] Avoid polymorphic commands to be more statically easier (#15202)
70-
* [dotnet] Optimize reflection in `JsonEnumMemberConverter` (#15205)
71-
* [dotnet] Annotate nullability on firefox and chromium options (#15206)
72-
* [dotnet] Annotate nullability on `Actions` type (#15208)
73-
* [dotnet] Fix marionette host Firefox argument (#15153)
74-
* [dotnet] Make it easier to read bidi logs
75-
* [dotnet] Annotate nullability on `Navigate()` and `SwitchTo()` (#15211)
76-
* [dotnet] Annotate nullability on Firefox profile (#15207)
77-
* [dotnet] Annotate nullability on network interactions (#15209)
78-
* [dotnet] Add nullability to `Manage()` (#15210)
79-
* [dotnet] Remove Firefox CDP (#15200)
80-
* [dotnet] Fully annotate nullability on `HttpCommandExecutor` (#15110)
81-
* [dotnet] Annotate nullability on `SafariOptions`, error, and enums (#15219)
82-
* [dotnet] Fix `JavaScriptEngine.ScriptCallbackBindings` not containing new bindings (#15221)
83-
* [dotnet] Handle nullability on `WebElement` (#15225)
84-
* [dotnet] Annotate nullability on `FirefoxDriverService` (#15220)
85-
* [dotnet] Add nullability annotations to devtools domains (#15143)
86-
* [dotnet] Annotate nullability on Domains (#15237)
87-
* [dotnet] Add not-null `Response.Value` helper (#15243)
88-
* [dotnet] Annotate nullability on `JavaScript` protocol (#15238)
89-
* [dotnet] Annotate nullability on `Target` protocol (#15240)
90-
* [dotnet] Annotate nullability on `Log` protocol (#15239)
91-
* [dotnet] Annotate nullability on `JavaScriptEngine` and related types (#15218)
92-
* [dotnet] Annotate nullability on `DevToolsSession` (#15244)
93-
* [dotnet] [bidi] Support getting of client windows in browser module (#15241)
94-
* [dotnet][bidi] Remove json serialization from transport layer (#15250)
95-
* [dotnet][bidi] Add BrowsingContext.OnNavigationCommitted event (#15253)
96-
* [dotnet][bidi] Use subscription id for events to unsubscribe (#15251)
97-
* [dotnet][bidi] Add optional PromptUnload parameter when closing BrowsingContext and compiler helps (#15254)
98-
* [dotnet] Annotate nullability on `DevTools` and event args (#15252)
99-
* [dotnet] Annotate nullability on platform-specific WebDrivers (#15236)
100-
* [dotnet] Add back in a public parameterless constructor to `HttpRequestData` (#15258)
101-
* [dotnet] Simplify user creation of network types (#15267)
102-
* [dotnet][bidi] Remove AsBiDiContextAsync helper to avoid disposal issue (#15279)
103-
* [dotnet] Possibility to override underlying HttpClient/HttpClientHandler for all HTTP requests (#15283)
104-
* [dotnet][bidi] Underlying local/remote script number as double (#15301)
50+
* [bidi] Add network SetCacheBehavior command (#15133)
51+
* Annotate nullability on devtools event args (#15134)
52+
* Annotate nullability for `DriverService` and chromium/safari services (#15101)
53+
* Add nullability to `Command` type (#15147)
54+
* Annotate nullable reference types on input devices (#14804)
55+
* Annotate nullability on `SendingRemoteHttpRequestEventArgs` (#15148)
56+
* Fix obvious code style formatting
57+
* Address some build warnings (#15157)
58+
* Enhance Print PageSize class to support for predefined well-known sizes (#15144)
59+
* Improve bidi exception when it is not enabled (#15163)
60+
* Annotate nullability on `DriverOptions` (#15167)
61+
* Annotate nullability on `ChromiumOptions` (#15173)
62+
* Annotate nullability on interactions (#15152)
63+
* [bidi] Use JsonSerializerContext to be AOT friendly (#15162)
64+
* Annotate nullability on chrome-based driver services (#15154)
65+
* Simplify and modernize `DevToolsDomains.InitializeDomains` (#15198)
66+
* Add nullability to Chromium configuration types (#15204)
67+
* Allow UTF-16 tolerant string converter as a dictionary key (#15203)
68+
* Fix webauth credential to allow nullable `rpID` (#15201)
69+
* [bidi] Avoid polymorphic commands to be more statically easier (#15202)
70+
* Optimize reflection in `JsonEnumMemberConverter` (#15205)
71+
* Annotate nullability on firefox and chromium options (#15206)
72+
* Annotate nullability on `Actions` type (#15208)
73+
* Fix marionette host Firefox argument (#15153)
74+
* Make it easier to read bidi logs
75+
* Annotate nullability on `Navigate()` and `SwitchTo()` (#15211)
76+
* Annotate nullability on Firefox profile (#15207)
77+
* Annotate nullability on network interactions (#15209)
78+
* Add nullability to `Manage()` (#15210)
79+
* Remove Firefox CDP (#15200)
80+
* Fully annotate nullability on `HttpCommandExecutor` (#15110)
81+
* Annotate nullability on `SafariOptions`, error, and enums (#15219)
82+
* Fix `JavaScriptEngine.ScriptCallbackBindings` not containing new bindings (#15221)
83+
* Handle nullability on `WebElement` (#15225)
84+
* Annotate nullability on `FirefoxDriverService` (#15220)
85+
* Add nullability annotations to devtools domains (#15143)
86+
* Annotate nullability on Domains (#15237)
87+
* Add not-null `Response.Value` helper (#15243)
88+
* Annotate nullability on `JavaScript` protocol (#15238)
89+
* Annotate nullability on `Target` protocol (#15240)
90+
* Annotate nullability on `Log` protocol (#15239)
91+
* Annotate nullability on `JavaScriptEngine` and related types (#15218)
92+
* Annotate nullability on `DevToolsSession` (#15244)
93+
* [bidi] Support getting of client windows in browser module (#15241)
94+
* [bidi] Remove json serialization from transport layer (#15250)
95+
* [bidi] Add BrowsingContext.OnNavigationCommitted event (#15253)
96+
* [bidi] Use subscription id for events to unsubscribe (#15251)
97+
* [bidi] Add optional PromptUnload parameter when closing BrowsingContext and compiler helps (#15254)
98+
* Annotate nullability on `DevTools` and event args (#15252)
99+
* Annotate nullability on platform-specific WebDrivers (#15236)
100+
* Add back in a public parameterless constructor to `HttpRequestData` (#15258)
101+
* Simplify user creation of network types (#15267)
102+
* [bidi] Remove AsBiDiContextAsync helper to avoid disposal issue (#15279)
103+
* Possibility to override underlying HttpClient/HttpClientHandler for all HTTP requests (#15283)
104+
* [bidi] Underlying local/remote script number as double (#15301)
105105

106106
v4.28.0
107107
======
108108
* Add CDP for Chrome 132 and remove 129
109-
* [dotnet] Add nullability annotations to print types (#14773)
110-
* [dotnet] Propagate `IWebDriver.GetAttribute` obsoletion to `WebDriver` (#14802)
111-
* [dotnet] Add nullability annotations to `ShadowRoot` (#14812)
112-
* [dotnet] Fix `WebDriver.AuthenticatorId` to return proper state set by user (#14814)
113-
* [dotnet] Add future-proofing note on `Base64UrlEncoder` (#14821)
109+
* Add nullability annotations to print types (#14773)
110+
* Propagate `IWebDriver.GetAttribute` obsoletion to `WebDriver` (#14802)
111+
* Add nullability annotations to `ShadowRoot` (#14812)
112+
* Fix `WebDriver.AuthenticatorId` to return proper state set by user (#14814)
113+
* Add future-proofing note on `Base64UrlEncoder` (#14821)
114114
* Run update_copyright script. No logical changes
115-
* [dotnet] Add nullable reference annotations to `Platform` (#14834)
116-
* [dotnet] Fix Virtual Authenticator removal, annotate NRT (#14822)
117-
* [dotnet] Annotate Nullable Reference Types on `OpenQA.Selenium.Internal` (#14840)
118-
* [dotnet] Annotate nullable reference types in internal logging (#14819)
119-
* [dotnet] Address warnings with `ActionSequence.inputDevice` and use proper alternative (#14848)
120-
* [dotnet] Add nullability annotations to `Proxy` (#14861)
121-
* [dotnet] Modernize `Response` type (#14839)
122-
* [dotnet] Add nullability to Logs API (#14875)
123-
* [dotnet] Add nullability to `CookieJar` (#14874)
124-
* [dotnet] Refactor away private constructor from `Response` (#14877)
125-
* [dotnet] Add nullability to `Alert`s (#14669)
126-
* [dotnet] [bidi] Convert RemoteRefrence to an interface
127-
* [dotnet] [bidi] Convert RemoteObjectReference to an interface
128-
* [dotnet] [bidi] Fix name of autodetect proxy configuration
129-
* [dotnet] [cdp] Add more internal logs around CDP implementation (Related to #14903)
130-
* [dotnet] Add nullability annotations to `SessionId` (#14841)
131-
* [dotnet] Align WebDriver errors with specification (#14936)
132-
* [dotnet] Add nullability to `IniFileReader` (#14929)
133-
* [dotnet] Annotate nullability on command repository (#14888)
134-
* [dotnet] Revert deprecation of GetAttribute method (#14956)
135-
* [dotnet] Annotate `DriverServiceCommandExecutor` for nullability (#14942)
136-
* [dotnet] Do not intercept exceptions from `ICommandExecutor.ExecuteAsync` (#14892)
137-
* [dotnet] Move `Response` constructors towards immutability (#14998)
138-
* [dotnet] Switch DevTools response JSON parsing to `JsonElement` (#14990)
139-
* [dotnet] Utilize dedicated WebDriver Spec endpoint to get named cookie (#14957)
140-
* [dotnet] Tolerate invalid UTF-16 strings in DevTools JSON response (#14972)
141-
* [dotnet] Fix logging issue when log context level conflicts with logger already captured level (#15057)
142-
* [dotnet] Safari driver supports /status endpoint (#15066)
143-
* [dotnet] Simplify nuget package readme code example
144-
* [dotnet] Guard for cookie deletion when name is empty (#15074)
145-
* [dotnet] Add nullability to `FirefoxExtension` (#14964)
146-
* [dotnet] Start adding nullable reference type annotations to the `Support` package (#14779)
147-
* [dotnet] Finish nullability annotations on `Support` package (#15089)
115+
* Add nullable reference annotations to `Platform` (#14834)
116+
* Fix Virtual Authenticator removal, annotate NRT (#14822)
117+
* Annotate Nullable Reference Types on `OpenQA.Selenium.Internal` (#14840)
118+
* Annotate nullable reference types in internal logging (#14819)
119+
* Address warnings with `ActionSequence.inputDevice` and use proper alternative (#14848)
120+
* Add nullability annotations to `Proxy` (#14861)
121+
* Modernize `Response` type (#14839)
122+
* Add nullability to Logs API (#14875)
123+
* Add nullability to `CookieJar` (#14874)
124+
* Refactor away private constructor from `Response` (#14877)
125+
* Add nullability to `Alert`s (#14669)
126+
* [bidi] Convert RemoteRefrence to an interface
127+
* [bidi] Convert RemoteObjectReference to an interface
128+
* [bidi] Fix name of autodetect proxy configuration
129+
* [cdp] Add more internal logs around CDP implementation (Related to #14903)
130+
* Add nullability annotations to `SessionId` (#14841)
131+
* Align WebDriver errors with specification (#14936)
132+
* Add nullability to `IniFileReader` (#14929)
133+
* Annotate nullability on command repository (#14888)
134+
* Revert deprecation of GetAttribute method (#14956)
135+
* Annotate `DriverServiceCommandExecutor` for nullability (#14942)
136+
* Do not intercept exceptions from `ICommandExecutor.ExecuteAsync` (#14892)
137+
* Move `Response` constructors towards immutability (#14998)
138+
* Switch DevTools response JSON parsing to `JsonElement` (#14990)
139+
* Utilize dedicated WebDriver Spec endpoint to get named cookie (#14957)
140+
* Tolerate invalid UTF-16 strings in DevTools JSON response (#14972)
141+
* Fix logging issue when log context level conflicts with logger already captured level (#15057)
142+
* Safari driver supports /status endpoint (#15066)
143+
* Simplify nuget package readme code example
144+
* Guard for cookie deletion when name is empty (#15074)
145+
* Add nullability to `FirefoxExtension` (#14964)
146+
* Start adding nullable reference type annotations to the `Support` package (#14779)
147+
* Finish nullability annotations on `Support` package (#15089)
148148
* Update supported versions for Chrome DevTools
149149

150150
v4.27.0

dotnet/src/webdriver/BiDi/Communication/Json/BiDiJsonSerializerContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ namespace OpenQA.Selenium.BiDi.Communication.Json;
120120
[JsonSerializable(typeof(Modules.BrowsingContext.UserPromptOpenedEventArgs))]
121121
[JsonSerializable(typeof(Modules.BrowsingContext.UserPromptClosedEventArgs))]
122122

123-
[JsonSerializable(typeof(Modules.Network.ContinueWithAuthParameters.Default), TypeInfoPropertyName = "Network_ContinueWithAuthParameters_Default")]
124123
[JsonSerializable(typeof(Modules.Network.AddInterceptCommand))]
125124
[JsonSerializable(typeof(Modules.Network.AddInterceptResult))]
126125
[JsonSerializable(typeof(Modules.Network.ContinueRequestCommand))]

dotnet/src/webdriver/BiDi/Modules/Network/ContinueWithAuthCommand.cs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,26 @@ internal class ContinueWithAuthCommand(ContinueWithAuthParameters @params)
2626
: Command<ContinueWithAuthParameters>(@params, "network.continueWithAuth");
2727

2828
[JsonPolymorphic(TypeDiscriminatorPropertyName = "action")]
29-
[JsonDerivedType(typeof(Credentials), "provideCredentials")]
30-
[JsonDerivedType(typeof(Default), "default")]
31-
[JsonDerivedType(typeof(Cancel), "cancel")]
32-
internal abstract record ContinueWithAuthParameters(Request Request) : CommandParameters
33-
{
34-
internal record Credentials(Request Request, [property: JsonPropertyName("credentials")] AuthCredentials AuthCredentials) : ContinueWithAuthParameters(Request);
29+
[JsonDerivedType(typeof(ContinueWithAuthCredentials), "provideCredentials")]
30+
[JsonDerivedType(typeof(ContinueWithAuthDefaultCredentials), "default")]
31+
[JsonDerivedType(typeof(ContinueWithAuthCancelCredentials), "cancel")]
32+
internal abstract record ContinueWithAuthParameters(Request Request) : CommandParameters;
3533

36-
internal record Default(Request Request) : ContinueWithAuthParameters(Request);
34+
internal record ContinueWithAuthCredentials(Request Request, AuthCredentials Credentials) : ContinueWithAuthParameters(Request);
3735

38-
internal record Cancel(Request Request) : ContinueWithAuthParameters(Request);
39-
}
36+
internal abstract record ContinueWithAuthNoCredentials(Request Request) : ContinueWithAuthParameters(Request);
37+
38+
internal record ContinueWithAuthDefaultCredentials(Request Request) : ContinueWithAuthNoCredentials(Request);
39+
40+
internal record ContinueWithAuthCancelCredentials(Request Request) : ContinueWithAuthNoCredentials(Request);
4041

4142
public record ContinueWithAuthOptions : CommandOptions;
4243

43-
public record ContinueWithDefaultAuthOptions : CommandOptions;
44+
public record ContinueWithAuthCredentialsOptions : ContinueWithAuthOptions;
45+
46+
public record ContinueWithAuthNoCredentialsOptions : ContinueWithAuthOptions;
47+
48+
public record ContinueWithAuthDefaultCredentialsOptions : ContinueWithAuthNoCredentialsOptions;
49+
50+
public record ContinueWithAuthCancelCredentialsOptions : ContinueWithAuthNoCredentialsOptions;
4451

45-
public record ContinueWithCancelledAuthOptions : CommandOptions;

dotnet/src/webdriver/BiDi/Modules/Network/NetworkModule.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,19 @@ internal async Task ProvideResponseAsync(Request request, ProvideResponseOptions
104104
await Broker.ExecuteCommandAsync(new ProvideResponseCommand(@params), options).ConfigureAwait(false);
105105
}
106106

107-
internal async Task ContinueWithAuthAsync(Request request, AuthCredentials credentials, ContinueWithAuthOptions? options = null)
107+
internal async Task ContinueWithAuthAsync(Request request, AuthCredentials credentials, ContinueWithAuthCredentialsOptions? options = null)
108108
{
109-
await Broker.ExecuteCommandAsync(new ContinueWithAuthCommand(new ContinueWithAuthParameters.Credentials(request, credentials)), options).ConfigureAwait(false);
109+
await Broker.ExecuteCommandAsync(new ContinueWithAuthCommand(new ContinueWithAuthCredentials(request, credentials)), options).ConfigureAwait(false);
110110
}
111111

112-
internal async Task ContinueWithAuthAsync(Request request, ContinueWithDefaultAuthOptions? options = null)
112+
internal async Task ContinueWithAuthAsync(Request request, ContinueWithAuthDefaultCredentialsOptions? options = null)
113113
{
114-
await Broker.ExecuteCommandAsync(new ContinueWithAuthCommand(new ContinueWithAuthParameters.Default(request)), options).ConfigureAwait(false);
114+
await Broker.ExecuteCommandAsync(new ContinueWithAuthCommand(new ContinueWithAuthDefaultCredentials(request)), options).ConfigureAwait(false);
115115
}
116116

117-
internal async Task ContinueWithAuthAsync(Request request, ContinueWithCancelledAuthOptions? options = null)
117+
internal async Task ContinueWithAuthAsync(Request request, ContinueWithAuthCancelCredentialsOptions? options = null)
118118
{
119-
await Broker.ExecuteCommandAsync(new ContinueWithAuthCommand(new ContinueWithAuthParameters.Cancel(request)), options).ConfigureAwait(false);
119+
await Broker.ExecuteCommandAsync(new ContinueWithAuthCommand(new ContinueWithAuthCancelCredentials(request)), options).ConfigureAwait(false);
120120
}
121121

122122
public async Task<Subscription> OnBeforeRequestSentAsync(Func<BeforeRequestSentEventArgs, Task> handler, SubscriptionOptions? options = null)

dotnet/src/webdriver/BiDi/Modules/Network/Request.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ public Task ContinueResponseAsync(ContinueResponseOptions? options = null)
5353
return _bidi.Network.ContinueResponseAsync(this, options);
5454
}
5555

56-
public Task ContinueWithAuthAsync(AuthCredentials credentials, ContinueWithAuthOptions? options = null)
56+
public Task ContinueWithAuthAsync(AuthCredentials credentials, ContinueWithAuthCredentialsOptions? options = null)
5757
{
5858
return _bidi.Network.ContinueWithAuthAsync(this, credentials, options);
5959
}
6060

61-
public Task ContinueWithAuthAsync(ContinueWithDefaultAuthOptions? options = null)
61+
public Task ContinueWithAuthAsync(ContinueWithAuthDefaultCredentialsOptions? options = null)
6262
{
6363
return _bidi.Network.ContinueWithAuthAsync(this, options);
6464
}
6565

66-
public Task ContinueWithAuthAsync(ContinueWithCancelledAuthOptions? options = null)
66+
public Task ContinueWithAuthAsync(ContinueWithAuthCancelCredentialsOptions? options = null)
6767
{
6868
return _bidi.Network.ContinueWithAuthAsync(this, options);
6969
}

dotnet/test/common/BiDi/Network/NetworkTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ public async Task CanContinueWithAuthCredentials()
162162
{
163163
await using var intercept = await bidi.Network.InterceptAuthAsync(async e =>
164164
{
165-
//TODO Seems it would be better to have method which takes abstract options
166165
await e.Request.Request.ContinueWithAuthAsync(new AuthCredentials("test", "test"));
167166
});
168167

@@ -177,7 +176,7 @@ public async Task CanContinueWithDefaultCredentials()
177176
{
178177
await using var intercept = await bidi.Network.InterceptAuthAsync(async e =>
179178
{
180-
await e.Request.Request.ContinueWithAuthAsync(new ContinueWithDefaultAuthOptions());
179+
await e.Request.Request.ContinueWithAuthAsync(new ContinueWithAuthDefaultCredentialsOptions());
181180
});
182181

183182
var action = async () => await context.NavigateAsync(UrlBuilder.WhereIs("basicAuth"), new() { Wait = ReadinessState.Complete });
@@ -191,7 +190,7 @@ public async Task CanContinueWithCanceledCredentials()
191190
{
192191
await using var intercept = await bidi.Network.InterceptAuthAsync(async e =>
193192
{
194-
await e.Request.Request.ContinueWithAuthAsync(new ContinueWithCancelledAuthOptions());
193+
await e.Request.Request.ContinueWithAuthAsync(new ContinueWithAuthCancelCredentialsOptions());
195194
});
196195

197196
var action = async () => await context.NavigateAsync(UrlBuilder.WhereIs("basicAuth"), new() { Wait = ReadinessState.Complete });

0 commit comments

Comments
 (0)