Skip to content

Commit d17db9d

Browse files
committed
[dotnet][cdp] add support for Chrome 98 and remove support for Chrome 95
1 parent ccec0b2 commit d17db9d

File tree

9 files changed

+61
-61
lines changed

9 files changed

+61
-61
lines changed

‎dotnet/selenium-dotnet-version.bzl

Lines changed: 2 additions & 2 deletions
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-
"v95",
1110
"v96",
12-
"v97"
11+
"v97",
12+
"v98"
1313
]
1414

1515
ASSEMBLY_COMPANY = "Selenium Committers"

‎dotnet/src/webdriver/DevTools/DevToolsDomains.cs

Lines changed: 1 addition & 1 deletion
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+
{ 98, typeof(V98.V98Domains) },
4041
{ 97, typeof(V97.V97Domains) },
4142
{ 96, typeof(V96.V96Domains) },
42-
{ 95, typeof(V95.V95Domains) },
4343
{ 85, typeof(V85.V85Domains) }
4444
};
4545

‎dotnet/src/webdriver/DevTools/v95/V95Domains.cs renamed to ‎dotnet/src/webdriver/DevTools/v98/V98Domains.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V95Domains.cs" company="WebDriver Committers">
1+
// <copyright file="V98Domains.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.V95
22+
namespace OpenQA.Selenium.DevTools.V98
2323
{
2424
/// <summary>
25-
/// Class containing the domain implementation for version 94 of the DevTools Protocol.
25+
/// Class containing the domain implementation for version 98 of the DevTools Protocol.
2626
/// </summary>
27-
public class V95Domains : DevToolsDomains
27+
public class V98Domains : DevToolsDomains
2828
{
2929
private DevToolsSessionDomains domains;
3030

31-
public V95Domains(DevToolsSession session)
31+
public V98Domains(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 => 95;
39+
public static int DevToolsVersion => 98;
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 V95Domains(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 V95Network(domains.Network, domains.Fetch);
49+
public override DevTools.Network Network => new V98Network(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 V95JavaScript(domains.Runtime, domains.Page);
54+
public override JavaScript JavaScript => new V98JavaScript(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 V95Target(domains.Target);
59+
public override DevTools.Target Target => new V98Target(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 V95Log(domains.Log);
64+
public override DevTools.Log Log => new V98Log(domains.Log);
6565
}
6666
}

‎dotnet/src/webdriver/DevTools/v95/V95JavaScript.cs renamed to ‎dotnet/src/webdriver/DevTools/v98/V98JavaScript.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V95JavaScript.cs" company="WebDriver Committers">
1+
// <copyright file="V98JavaScript.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.V95.Page;
22-
using OpenQA.Selenium.DevTools.V95.Runtime;
21+
using OpenQA.Selenium.DevTools.V98.Page;
22+
using OpenQA.Selenium.DevTools.V98.Runtime;
2323

24-
namespace OpenQA.Selenium.DevTools.V95
24+
namespace OpenQA.Selenium.DevTools.V98
2525
{
2626
/// <summary>
2727
/// Class containing the JavaScript implementation for version 89 of the DevTools Protocol.
2828
/// </summary>
29-
public class V95JavaScript : JavaScript
29+
public class V98JavaScript : JavaScript
3030
{
3131
private RuntimeAdapter runtime;
3232
private PageAdapter page;
3333

3434
/// <summary>
35-
/// Initializes a new instance of the <see cref="V95JavaScript"/> class.
35+
/// Initializes a new instance of the <see cref="V98JavaScript"/> 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 V95JavaScript(RuntimeAdapter runtime, PageAdapter page)
39+
public V98JavaScript(RuntimeAdapter runtime, PageAdapter page)
4040
{
4141
this.runtime = runtime;
4242
this.page = page;

‎dotnet/src/webdriver/DevTools/v95/V95Log.cs renamed to ‎dotnet/src/webdriver/DevTools/v98/V98Log.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V95Log.cs" company="WebDriver Committers">
1+
// <copyright file="V98Log.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.V95.Log;
23+
using OpenQA.Selenium.DevTools.V98.Log;
2424

25-
namespace OpenQA.Selenium.DevTools.V95
25+
namespace OpenQA.Selenium.DevTools.V98
2626
{
2727
/// <summary>
2828
/// Class containing the browser's log as referenced by version 89 of the DevTools Protocol.
2929
/// </summary>
30-
public class V95Log : DevTools.Log
30+
public class V98Log : DevTools.Log
3131
{
3232
private LogAdapter adapter;
3333

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

‎dotnet/src/webdriver/DevTools/v95/V95Network.cs renamed to ‎dotnet/src/webdriver/DevTools/v98/V98Network.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V95Network.cs" company="WebDriver Committers">
1+
// <copyright file="V98Network.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.V95.Fetch;
24-
using OpenQA.Selenium.DevTools.V95.Network;
23+
using OpenQA.Selenium.DevTools.V98.Fetch;
24+
using OpenQA.Selenium.DevTools.V98.Network;
2525

26-
namespace OpenQA.Selenium.DevTools.V95
26+
namespace OpenQA.Selenium.DevTools.V98
2727
{
2828
/// <summary>
2929
/// Class providing functionality for manipulating network calls using version 89 of the DevTools Protocol
3030
/// </summary>
31-
public class V95Network : DevTools.Network
31+
public class V98Network : DevTools.Network
3232
{
3333
private FetchAdapter fetch;
3434
private NetworkAdapter network;
3535

3636
/// <summary>
37-
/// Initializes a new instance of the <see cref="V95Network"/> class.
37+
/// Initializes a new instance of the <see cref="V98Network"/> 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 V95Network(NetworkAdapter network, FetchAdapter fetch)
41+
public V98Network(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.V95.Fetch.EnableCommandSettings()
83+
await fetch.Enable(new OpenQA.Selenium.DevTools.V98.Fetch.EnableCommandSettings()
8484
{
85-
Patterns = new OpenQA.Selenium.DevTools.V95.Fetch.RequestPattern[]
85+
Patterns = new OpenQA.Selenium.DevTools.V98.Fetch.RequestPattern[]
8686
{
87-
new OpenQA.Selenium.DevTools.V95.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request },
88-
new OpenQA.Selenium.DevTools.V95.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Response }
87+
new OpenQA.Selenium.DevTools.V98.Fetch.RequestPattern() { UrlPattern = "*", RequestStage = RequestStage.Request },
88+
new OpenQA.Selenium.DevTools.V98.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 V95.Fetch.AuthChallengeResponse()
211+
AuthChallengeResponse = new V98.Fetch.AuthChallengeResponse()
212212
{
213-
Response = V95.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials,
213+
Response = V98.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.V95.Fetch.AuthChallengeResponse()
230+
AuthChallengeResponse = new OpenQA.Selenium.DevTools.V98.Fetch.AuthChallengeResponse()
231231
{
232-
Response = V95.Fetch.AuthChallengeResponseResponseValues.CancelAuth
232+
Response = V98.Fetch.AuthChallengeResponseResponseValues.CancelAuth
233233
}
234234
});
235235
}

‎dotnet/src/webdriver/DevTools/v95/V95Target.cs renamed to ‎dotnet/src/webdriver/DevTools/v98/V98Target.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="V95Target.cs" company="WebDriver Committers">
1+
// <copyright file="V98Target.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.V95.Target;
24+
using OpenQA.Selenium.DevTools.V98.Target;
2525

26-
namespace OpenQA.Selenium.DevTools.V95
26+
namespace OpenQA.Selenium.DevTools.V98
2727
{
2828
/// <summary>
29-
/// Class providing functionality for manipulating targets for version 94 of the DevTools Protocol
29+
/// Class providing functionality for manipulating targets for version 98 of the DevTools Protocol
3030
/// </summary>
31-
public class V95Target : DevTools.Target
31+
public class V98Target : DevTools.Target
3232
{
3333
private TargetAdapter adapter;
3434

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

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

Lines changed: 7 additions & 7 deletions
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\v95\DevToolsSessionDomains.cs" (
31-
echo Generating CDP code for version 95
32-
pushd "%1..\..\.."
33-
bazel build //dotnet/src/webdriver/cdp:generate-v95
34-
popd
35-
)
36-
3730
if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v96\DevToolsSessionDomains.cs" (
3831
echo Generating CDP code for version 96
3932
pushd "%1..\..\.."
@@ -47,3 +40,10 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v97\DevToolsSession
4740
bazel build //dotnet/src/webdriver/cdp:generate-v97
4841
popd
4942
)
43+
44+
if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v98\DevToolsSessionDomains.cs" (
45+
echo Generating CDP code for version 98
46+
pushd "%1..\..\.."
47+
bazel build //dotnet/src/webdriver/cdp:generate-v98
48+
popd
49+
)

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

Lines changed: 6 additions & 6 deletions
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/v95/DevToolsSessionDomains.cs" ]]
27-
then
28-
echo "Generating CDP code for version 95"
29-
bazel build //dotnet/src/webdriver/cdp:generate-v95
30-
fi
31-
3226
if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v96/DevToolsSessionDomains.cs" ]]
3327
then
3428
echo "Generating CDP code for version 96"
@@ -40,3 +34,9 @@ then
4034
echo "Generating CDP code for version 97"
4135
bazel build //dotnet/src/webdriver/cdp:generate-v97
4236
fi
37+
38+
if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v98/DevToolsSessionDomains.cs" ]]
39+
then
40+
echo "Generating CDP code for version 98"
41+
bazel build //dotnet/src/webdriver/cdp:generate-v98
42+
fi

0 commit comments

Comments
 (0)