Skip to content

Commit a8ab83a

Browse files
committed
[dotnet][cdp] add support for Chrome 109 and remove support for Chrome 106
1 parent 206c391 commit a8ab83a

16 files changed

+195
-195
lines changed

dotnet/selenium-dotnet-version.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ SUPPORTED_NET_STANDARD_VERSIONS = ["netstandard2.0", "netstandard2.1", "net5.0",
77

88
SUPPORTED_DEVTOOLS_VERSIONS = [
99
"v85",
10-
"v106",
1110
"v107",
1211
"v108",
12+
"v109",
1313
]
1414

1515
ASSEMBLY_COMPANY = "Selenium Committers"

dotnet/src/webdriver/DevTools/DevToolsDomains.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public abstract class DevToolsDomains
3737
// added to this dictionary.
3838
private static readonly Dictionary<int, Type> SupportedDevToolsVersions = new Dictionary<int, Type>()
3939
{
40+
{ 109, typeof(V109.V109Domains) },
4041
{ 108, typeof(V108.V108Domains) },
4142
{ 107, typeof(V107.V107Domains) },
42-
{ 106, typeof(V106.V106Domains) },
4343
{ 85, typeof(V85.V85Domains) }
4444
};
4545

dotnet/src/webdriver/DevTools/v106/V106Domains.cs renamed to dotnet/src/webdriver/DevTools/v109/V109Domains.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V106Domains.cs" company="WebDriver Committers">
1+
// <copyright file="V109Domains.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -19,24 +19,24 @@
1919
using System.Collections.Generic;
2020
using System.Text;
2121

22-
namespace OpenQA.Selenium.DevTools.V106
22+
namespace OpenQA.Selenium.DevTools.V109
2323
{
2424
/// <summary>
25-
/// Class containing the domain implementation for version 106 of the DevTools Protocol.
25+
/// Class containing the domain implementation for version 109 of the DevTools Protocol.
2626
/// </summary>
27-
public class V106Domains : DevToolsDomains
27+
public class V109Domains : DevToolsDomains
2828
{
2929
private DevToolsSessionDomains domains;
3030

31-
public V106Domains(DevToolsSession session)
31+
public V109Domains(DevToolsSession session)
3232
{
3333
this.domains = new DevToolsSessionDomains(session);
3434
}
3535

3636
/// <summary>
3737
/// Gets the DevTools Protocol version for which this class is valid.
3838
/// </summary>
39-
public static int DevToolsVersion => 106;
39+
public static int DevToolsVersion => 109;
4040

4141
/// <summary>
4242
/// Gets the version-specific domains for the DevTools session. This value must be cast to a version specific type to be at all useful.
@@ -46,21 +46,21 @@ public V106Domains(DevToolsSession session)
4646
/// <summary>
4747
/// Gets the object used for manipulating network information in the browser.
4848
/// </summary>
49-
public override DevTools.Network Network => new V106Network(domains.Network, domains.Fetch);
49+
public override DevTools.Network Network => new V109Network(domains.Network, domains.Fetch);
5050

5151
/// <summary>
5252
/// Gets the object used for manipulating the browser's JavaScript execution.
5353
/// </summary>
54-
public override JavaScript JavaScript => new V106JavaScript(domains.Runtime, domains.Page);
54+
public override JavaScript JavaScript => new V109JavaScript(domains.Runtime, domains.Page);
5555

5656
/// <summary>
5757
/// Gets the object used for manipulating DevTools Protocol targets.
5858
/// </summary>
59-
public override DevTools.Target Target => new V106Target(domains.Target);
59+
public override DevTools.Target Target => new V109Target(domains.Target);
6060

6161
/// <summary>
6262
/// Gets the object used for manipulating the browser's logs.
6363
/// </summary>
64-
public override DevTools.Log Log => new V106Log(domains.Log);
64+
public override DevTools.Log Log => new V109Log(domains.Log);
6565
}
6666
}

dotnet/src/webdriver/DevTools/v106/V106JavaScript.cs renamed to dotnet/src/webdriver/DevTools/v109/V109JavaScript.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V106JavaScript.cs" company="WebDriver Committers">
1+
// <copyright file="V109JavaScript.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -18,25 +18,25 @@
1818
using System;
1919
using System.Collections.Generic;
2020
using System.Threading.Tasks;
21-
using OpenQA.Selenium.DevTools.V106.Page;
22-
using OpenQA.Selenium.DevTools.V106.Runtime;
21+
using OpenQA.Selenium.DevTools.V109.Page;
22+
using OpenQA.Selenium.DevTools.V109.Runtime;
2323

24-
namespace OpenQA.Selenium.DevTools.V106
24+
namespace OpenQA.Selenium.DevTools.V109
2525
{
2626
/// <summary>
27-
/// Class containing the JavaScript implementation for version 106 of the DevTools Protocol.
27+
/// Class containing the JavaScript implementation for version 109 of the DevTools Protocol.
2828
/// </summary>
29-
public class V106JavaScript : JavaScript
29+
public class V109JavaScript : JavaScript
3030
{
3131
private RuntimeAdapter runtime;
3232
private PageAdapter page;
3333

3434
/// <summary>
35-
/// Initializes a new instance of the <see cref="V106JavaScript"/> class.
35+
/// Initializes a new instance of the <see cref="V109JavaScript"/> class.
3636
/// </summary>
3737
/// <param name="runtime">The DevTools Protocol adapter for the Runtime domain.</param>
3838
/// <param name="page">The DevTools Protocol adapter for the Page domain.</param>
39-
public V106JavaScript(RuntimeAdapter runtime, PageAdapter page)
39+
public V109JavaScript(RuntimeAdapter runtime, PageAdapter page)
4040
{
4141
this.runtime = runtime;
4242
this.page = page;

dotnet/src/webdriver/DevTools/v106/V106Log.cs renamed to dotnet/src/webdriver/DevTools/v109/V109Log.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V106Log.cs" company="WebDriver Committers">
1+
// <copyright file="V109Log.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -20,22 +20,22 @@
2020
using System.Text;
2121
using System.Threading;
2222
using System.Threading.Tasks;
23-
using OpenQA.Selenium.DevTools.V106.Log;
23+
using OpenQA.Selenium.DevTools.V109.Log;
2424

25-
namespace OpenQA.Selenium.DevTools.V106
25+
namespace OpenQA.Selenium.DevTools.V109
2626
{
2727
/// <summary>
28-
/// Class containing the browser's log as referenced by version 106 of the DevTools Protocol.
28+
/// Class containing the browser's log as referenced by version 109 of the DevTools Protocol.
2929
/// </summary>
30-
public class V106Log : DevTools.Log
30+
public class V109Log : DevTools.Log
3131
{
3232
private LogAdapter adapter;
3333

3434
/// <summary>
35-
/// Initializes a new instance of the <see cref="V106Log"/> class.
35+
/// Initializes a new instance of the <see cref="V109Log"/> class.
3636
/// </summary>
3737
/// <param name="adapter">The adapter for the Log domain.</param>
38-
public V106Log(LogAdapter adapter)
38+
public V109Log(LogAdapter adapter)
3939
{
4040
this.adapter = adapter;
4141
this.adapter.EntryAdded += OnAdapterEntryAdded;

dotnet/src/webdriver/DevTools/v106/V106Network.cs renamed to dotnet/src/webdriver/DevTools/v109/V109Network.cs

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V106Network.cs" company="WebDriver Committers">
1+
// <copyright file="V109Network.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -20,25 +20,25 @@
2020
using System.Collections.Generic;
2121
using System.Text;
2222
using System.Threading.Tasks;
23-
using OpenQA.Selenium.DevTools.V106.Fetch;
24-
using OpenQA.Selenium.DevTools.V106.Network;
23+
using OpenQA.Selenium.DevTools.V109.Fetch;
24+
using OpenQA.Selenium.DevTools.V109.Network;
2525

26-
namespace OpenQA.Selenium.DevTools.V106
26+
namespace OpenQA.Selenium.DevTools.V109
2727
{
2828
/// <summary>
29-
/// Class providing functionality for manipulating network calls using version 106 of the DevTools Protocol
29+
/// Class providing functionality for manipulating network calls using version 109 of the DevTools Protocol
3030
/// </summary>
31-
public class V106Network : DevTools.Network
31+
public class V109Network : DevTools.Network
3232
{
3333
private FetchAdapter fetch;
3434
private NetworkAdapter network;
3535

3636
/// <summary>
37-
/// Initializes a new instance of the <see cref="V106Network"/> class.
37+
/// Initializes a new instance of the <see cref="V109Network"/> class.
3838
/// </summary>
3939
/// <param name="network">The adapter for the Network domain.</param>
4040
/// <param name="fetch">The adapter for the Fetch domain.</param>
41-
public V106Network(NetworkAdapter network, FetchAdapter fetch)
41+
public V109Network(NetworkAdapter network, FetchAdapter fetch)
4242
{
4343
this.network = network;
4444
this.fetch = fetch;
@@ -80,12 +80,12 @@ public override async Task DisableNetwork()
8080
/// <returns>A task that represents the asynchronous operation.</returns>
8181
public override async Task EnableFetchForAllPatterns()
8282
{
83-
await fetch.Enable(new OpenQA.Selenium.DevTools.V106.Fetch.EnableCommandSettings()
83+
await fetch.Enable(new OpenQA.Selenium.DevTools.V109.Fetch.EnableCommandSettings()
8484
{
85-
Patterns = new OpenQA.Selenium.DevTools.V106.Fetch.RequestPattern[]
85+
Patterns = new OpenQA.Selenium.DevTools.V109.Fetch.RequestPattern[]
8686
{
87-
new OpenQA.Selenium.DevTools.V106.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request },
88-
new OpenQA.Selenium.DevTools.V106.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response }
87+
new OpenQA.Selenium.DevTools.V109.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request },
88+
new OpenQA.Selenium.DevTools.V109.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response }
8989
},
9090
HandleAuthRequests = true
9191
});
@@ -208,9 +208,9 @@ public override async Task ContinueWithAuth(string requestId, string userName, s
208208
await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings()
209209
{
210210
RequestId = requestId,
211-
AuthChallengeResponse = new V106.Fetch.AuthChallengeResponse()
211+
AuthChallengeResponse = new V109.Fetch.AuthChallengeResponse()
212212
{
213-
Response = V106.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials,
213+
Response = V109.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials,
214214
Username = userName,
215215
Password = password
216216
}
@@ -227,9 +227,9 @@ public override async Task CancelAuth(string requestId)
227227
await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings()
228228
{
229229
RequestId = requestId,
230-
AuthChallengeResponse = new OpenQA.Selenium.DevTools.V106.Fetch.AuthChallengeResponse()
230+
AuthChallengeResponse = new OpenQA.Selenium.DevTools.V109.Fetch.AuthChallengeResponse()
231231
{
232-
Response = V106.Fetch.AuthChallengeResponseResponseValues.CancelAuth
232+
Response = V109.Fetch.AuthChallengeResponseResponseValues.CancelAuth
233233
}
234234
});
235235
}

dotnet/src/webdriver/DevTools/v106/V106Target.cs renamed to dotnet/src/webdriver/DevTools/v109/V109Target.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V106Target.cs" company="WebDriver Committers">
1+
// <copyright file="V109Target.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -21,22 +21,22 @@
2121
using System.Collections.ObjectModel;
2222
using System.Text;
2323
using System.Threading.Tasks;
24-
using OpenQA.Selenium.DevTools.V106.Target;
24+
using OpenQA.Selenium.DevTools.V109.Target;
2525

26-
namespace OpenQA.Selenium.DevTools.V106
26+
namespace OpenQA.Selenium.DevTools.V109
2727
{
2828
/// <summary>
29-
/// Class providing functionality for manipulating targets for version 106 of the DevTools Protocol
29+
/// Class providing functionality for manipulating targets for version 109 of the DevTools Protocol
3030
/// </summary>
31-
public class V106Target : DevTools.Target
31+
public class V109Target : DevTools.Target
3232
{
3333
private TargetAdapter adapter;
3434

3535
/// <summary>
36-
/// Initializes a new instance of the <see cref="V106Target"/> class.
36+
/// Initializes a new instance of the <see cref="V109Target"/> class.
3737
/// </summary>
3838
/// <param name="adapter">The adapter for the Target domain.</param>
39-
public V106Target(TargetAdapter adapter)
39+
public V109Target(TargetAdapter adapter)
4040
{
4141
this.adapter = adapter;
4242
adapter.DetachedFromTarget += OnDetachedFromTarget;

dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v85\DevToolsSession
2727
popd
2828
)
2929

30-
if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v106\DevToolsSessionDomains.cs" (
31-
echo Generating CDP code for version 106
32-
pushd "%1..\..\.."
33-
bazel build //dotnet/src/webdriver/cdp:generate-v106
34-
popd
35-
)
36-
3730
if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v107\DevToolsSessionDomains.cs" (
3831
echo Generating CDP code for version 107
3932
pushd "%1..\..\.."
@@ -47,3 +40,10 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v108\DevToolsSessio
4740
bazel build //dotnet/src/webdriver/cdp:generate-v108
4841
popd
4942
)
43+
44+
if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v109\DevToolsSessionDomains.cs" (
45+
echo Generating CDP code for version 109
46+
pushd "%1..\..\.."
47+
bazel build //dotnet/src/webdriver/cdp:generate-v109
48+
popd
49+
)

dotnet/src/webdriver/WebDriver.csproj.prebuild.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ then
2323
bazel build //dotnet/src/webdriver/cdp:generate-v85
2424
fi
2525

26-
if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v106/DevToolsSessionDomains.cs" ]]
27-
then
28-
echo "Generating CDP code for version 106"
29-
bazel build //dotnet/src/webdriver/cdp:generate-v106
30-
fi
31-
3226
if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v107/DevToolsSessionDomains.cs" ]]
3327
then
3428
echo "Generating CDP code for version 107"
@@ -40,3 +34,9 @@ then
4034
echo "Generating CDP code for version 108"
4135
bazel build //dotnet/src/webdriver/cdp:generate-v108
4236
fi
37+
38+
if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v109/DevToolsSessionDomains.cs" ]]
39+
then
40+
echo "Generating CDP code for version 109"
41+
bazel build //dotnet/src/webdriver/cdp:generate-v109
42+
fi

dotnet/test/common/DevTools/DevToolsConsoleTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public class DevToolsConsoleTest : DevToolsTestFixture
1818
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
1919
public async Task VerifyMessageAdded()
2020
{
21-
var domains = session.GetVersionSpecificDomains<V108.DevToolsSessionDomains>();
21+
var domains = session.GetVersionSpecificDomains<V109.DevToolsSessionDomains>();
2222
string consoleMessage = "Hello Selenium";
2323

2424
ManualResetEventSlim sync = new ManualResetEventSlim(false);
25-
EventHandler<V108.Console.MessageAddedEventArgs> messageAddedHandler = (sender, e) =>
25+
EventHandler<V109.Console.MessageAddedEventArgs> messageAddedHandler = (sender, e) =>
2626
{
2727
Assert.That(e.Message.Text, Is.EqualTo(consoleMessage));
2828
sync.Set();

dotnet/test/common/DevTools/DevToolsLogTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ public class DevToolsLogTest : DevToolsTestFixture
1919
[IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")]
2020
public async Task VerifyEntryAddedAndClearLog()
2121
{
22-
var domains = session.GetVersionSpecificDomains<V108.DevToolsSessionDomains>();
22+
var domains = session.GetVersionSpecificDomains<V109.DevToolsSessionDomains>();
2323
ManualResetEventSlim sync = new ManualResetEventSlim(false);
24-
EventHandler<V108.Log.EntryAddedEventArgs> entryAddedHandler = (sender, e) =>
24+
EventHandler<V109.Log.EntryAddedEventArgs> entryAddedHandler = (sender, e) =>
2525
{
2626
Assert.That(e.Entry.Text.Contains("404"));
27-
Assert.That(e.Entry.Level == V108.Log.LogEntryLevelValues.Error);
27+
Assert.That(e.Entry.Level == V109.Log.LogEntryLevelValues.Error);
2828
sync.Set();
2929
};
3030

0 commit comments

Comments
 (0)