Skip to content

Commit

Permalink
[cdp] add v119 and remove v116 in all bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Nov 1, 2023
1 parent 2a061b2 commit 19e3585
Show file tree
Hide file tree
Showing 31 changed files with 131 additions and 135 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -98,7 +98,7 @@ task '//java/test/org/openqa/selenium/environment/webserver:webserver:uber' => [
JAVA_RELEASE_TARGETS = %w[
//java/src/org/openqa/selenium/chrome:chrome.publish
//java/src/org/openqa/selenium/chromium:chromium.publish
//java/src/org/openqa/selenium/devtools/v116:v116.publish
//java/src/org/openqa/selenium/devtools/v119:v119.publish
//java/src/org/openqa/selenium/devtools/v117:v117.publish
//java/src/org/openqa/selenium/devtools/v118:v118.publish
//java/src/org/openqa/selenium/devtools/v85:v85.publish
Expand Down
2 changes: 1 addition & 1 deletion dotnet/selenium-dotnet-version.bzl
Expand Up @@ -6,7 +6,7 @@ SUPPORTED_NET_STANDARD_VERSIONS = ["netstandard2.0"]

SUPPORTED_DEVTOOLS_VERSIONS = [
"v85",
"v116",
"v119",
"v117",
"v118",
]
Expand Down
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/DevTools/DevToolsDomains.cs
Expand Up @@ -39,7 +39,7 @@ public abstract class DevToolsDomains
{
{ 118, typeof(V118.V118Domains) },
{ 117, typeof(V117.V117Domains) },
{ 116, typeof(V116.V116Domains) },
{ 119, typeof(V119.V119Domains) },
{ 85, typeof(V85.V85Domains) }
};

Expand Down
@@ -1,4 +1,4 @@
// <copyright file="V116Domains.cs" company="WebDriver Committers">
// <copyright file="V119Domains.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand All @@ -19,28 +19,28 @@
using System.Collections.Generic;
using System.Text;

namespace OpenQA.Selenium.DevTools.V116
namespace OpenQA.Selenium.DevTools.V119
{
/// <summary>
/// Class containing the domain implementation for version 116 of the DevTools Protocol.
/// Class containing the domain implementation for version 119 of the DevTools Protocol.
/// </summary>
public class V116Domains : DevToolsDomains
public class V119Domains : DevToolsDomains
{
private DevToolsSessionDomains domains;

/// <summary>
/// Initializes a new instance of the V116Domains class.
/// Initializes a new instance of the V119Domains class.
/// </summary>
/// <param name="session">The DevToolsSession to use with this set of domains.</param>
public V116Domains(DevToolsSession session)
public V119Domains(DevToolsSession session)
{
this.domains = new DevToolsSessionDomains(session);
}

/// <summary>
/// Gets the DevTools Protocol version for which this class is valid.
/// </summary>
public static int DevToolsVersion => 116;
public static int DevToolsVersion => 119;

/// <summary>
/// Gets the version-specific domains for the DevTools session. This value must be cast to a version specific type to be at all useful.
Expand All @@ -50,21 +50,21 @@ public V116Domains(DevToolsSession session)
/// <summary>
/// Gets the object used for manipulating network information in the browser.
/// </summary>
public override DevTools.Network Network => new V116Network(domains.Network, domains.Fetch);
public override DevTools.Network Network => new V119Network(domains.Network, domains.Fetch);

/// <summary>
/// Gets the object used for manipulating the browser's JavaScript execution.
/// </summary>
public override JavaScript JavaScript => new V116JavaScript(domains.Runtime, domains.Page);
public override JavaScript JavaScript => new V119JavaScript(domains.Runtime, domains.Page);

/// <summary>
/// Gets the object used for manipulating DevTools Protocol targets.
/// </summary>
public override DevTools.Target Target => new V116Target(domains.Target);
public override DevTools.Target Target => new V119Target(domains.Target);

/// <summary>
/// Gets the object used for manipulating the browser's logs.
/// </summary>
public override DevTools.Log Log => new V116Log(domains.Log);
public override DevTools.Log Log => new V119Log(domains.Log);
}
}
@@ -1,4 +1,4 @@
// <copyright file="V116JavaScript.cs" company="WebDriver Committers">
// <copyright file="V119JavaScript.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand All @@ -18,25 +18,25 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using OpenQA.Selenium.DevTools.V116.Page;
using OpenQA.Selenium.DevTools.V116.Runtime;
using OpenQA.Selenium.DevTools.V119.Page;
using OpenQA.Selenium.DevTools.V119.Runtime;

namespace OpenQA.Selenium.DevTools.V116
namespace OpenQA.Selenium.DevTools.V119
{
/// <summary>
/// Class containing the JavaScript implementation for version 116 of the DevTools Protocol.
/// Class containing the JavaScript implementation for version 119 of the DevTools Protocol.
/// </summary>
public class V116JavaScript : JavaScript
public class V119JavaScript : JavaScript
{
private RuntimeAdapter runtime;
private PageAdapter page;

/// <summary>
/// Initializes a new instance of the <see cref="V116JavaScript"/> class.
/// Initializes a new instance of the <see cref="V119JavaScript"/> class.
/// </summary>
/// <param name="runtime">The DevTools Protocol adapter for the Runtime domain.</param>
/// <param name="page">The DevTools Protocol adapter for the Page domain.</param>
public V116JavaScript(RuntimeAdapter runtime, PageAdapter page)
public V119JavaScript(RuntimeAdapter runtime, PageAdapter page)
{
this.runtime = runtime;
this.page = page;
Expand Down
@@ -1,4 +1,4 @@
// <copyright file="V116Log.cs" company="WebDriver Committers">
// <copyright file="V119Log.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand All @@ -20,22 +20,22 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using OpenQA.Selenium.DevTools.V116.Log;
using OpenQA.Selenium.DevTools.V119.Log;

namespace OpenQA.Selenium.DevTools.V116
namespace OpenQA.Selenium.DevTools.V119
{
/// <summary>
/// Class containing the browser's log as referenced by version 116 of the DevTools Protocol.
/// Class containing the browser's log as referenced by version 119 of the DevTools Protocol.
/// </summary>
public class V116Log : DevTools.Log
public class V119Log : DevTools.Log
{
private LogAdapter adapter;

/// <summary>
/// Initializes a new instance of the <see cref="V116Log"/> class.
/// Initializes a new instance of the <see cref="V119Log"/> class.
/// </summary>
/// <param name="adapter">The adapter for the Log domain.</param>
public V116Log(LogAdapter adapter)
public V119Log(LogAdapter adapter)
{
this.adapter = adapter;
this.adapter.EntryAdded += OnAdapterEntryAdded;
Expand Down
@@ -1,4 +1,4 @@
// <copyright file="V116Network.cs" company="WebDriver Committers">
// <copyright file="V119Network.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand All @@ -20,25 +20,25 @@
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium.DevTools.V116.Fetch;
using OpenQA.Selenium.DevTools.V116.Network;
using OpenQA.Selenium.DevTools.V119.Fetch;
using OpenQA.Selenium.DevTools.V119.Network;

namespace OpenQA.Selenium.DevTools.V116
namespace OpenQA.Selenium.DevTools.V119
{
/// <summary>
/// Class providing functionality for manipulating network calls using version 116 of the DevTools Protocol
/// Class providing functionality for manipulating network calls using version 119 of the DevTools Protocol
/// </summary>
public class V116Network : DevTools.Network
public class V119Network : DevTools.Network
{
private FetchAdapter fetch;
private NetworkAdapter network;

/// <summary>
/// Initializes a new instance of the <see cref="V116Network"/> class.
/// Initializes a new instance of the <see cref="V119Network"/> class.
/// </summary>
/// <param name="network">The adapter for the Network domain.</param>
/// <param name="fetch">The adapter for the Fetch domain.</param>
public V116Network(NetworkAdapter network, FetchAdapter fetch)
public V119Network(NetworkAdapter network, FetchAdapter fetch)
{
this.network = network;
this.fetch = fetch;
Expand Down Expand Up @@ -216,9 +216,9 @@ public override async Task ContinueWithAuth(string requestId, string userName, s
await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings()
{
RequestId = requestId,
AuthChallengeResponse = new V116.Fetch.AuthChallengeResponse()
AuthChallengeResponse = new V119.Fetch.AuthChallengeResponse()
{
Response = V116.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials,
Response = V119.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials,
Username = userName,
Password = password
}
Expand All @@ -235,9 +235,9 @@ public override async Task CancelAuth(string requestId)
await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings()
{
RequestId = requestId,
AuthChallengeResponse = new OpenQA.Selenium.DevTools.V116.Fetch.AuthChallengeResponse()
AuthChallengeResponse = new OpenQA.Selenium.DevTools.V119.Fetch.AuthChallengeResponse()
{
Response = V116.Fetch.AuthChallengeResponseResponseValues.CancelAuth
Response = V119.Fetch.AuthChallengeResponseResponseValues.CancelAuth
}
}).ConfigureAwait(false);
}
Expand Down
@@ -1,4 +1,4 @@
// <copyright file="V116Target.cs" company="WebDriver Committers">
// <copyright file="V119Target.cs" company="WebDriver Committers">
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand All @@ -21,22 +21,22 @@
using System.Collections.ObjectModel;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium.DevTools.V116.Target;
using OpenQA.Selenium.DevTools.V119.Target;

namespace OpenQA.Selenium.DevTools.V116
namespace OpenQA.Selenium.DevTools.V119
{
/// <summary>
/// Class providing functionality for manipulating targets for version 116 of the DevTools Protocol
/// Class providing functionality for manipulating targets for version 119 of the DevTools Protocol
/// </summary>
public class V116Target : DevTools.Target
public class V119Target : DevTools.Target
{
private TargetAdapter adapter;

/// <summary>
/// Initializes a new instance of the <see cref="V116Target"/> class.
/// Initializes a new instance of the <see cref="V119Target"/> class.
/// </summary>
/// <param name="adapter">The adapter for the Target domain.</param>
public V116Target(TargetAdapter adapter)
public V119Target(TargetAdapter adapter)
{
this.adapter = adapter;
adapter.DetachedFromTarget += OnDetachedFromTarget;
Expand Down
6 changes: 3 additions & 3 deletions dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd
Expand Up @@ -27,10 +27,10 @@ if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v85\DevToolsSession
popd
)

if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v116\DevToolsSessionDomains.cs" (
echo Generating CDP code for version 116
if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\cdp\v119\DevToolsSessionDomains.cs" (
echo Generating CDP code for version 119
pushd "%1..\..\.."
bazel build //dotnet/src/webdriver/cdp:generate-v116
bazel build //dotnet/src/webdriver/cdp:generate-v119
popd
)

Expand Down
6 changes: 3 additions & 3 deletions dotnet/src/webdriver/WebDriver.csproj.prebuild.sh
Expand Up @@ -23,10 +23,10 @@ then
bazel build //dotnet/src/webdriver/cdp:generate-v85
fi

if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v116/DevToolsSessionDomains.cs" ]]
if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v119/DevToolsSessionDomains.cs" ]]
then
echo "Generating CDP code for version 116"
bazel build //dotnet/src/webdriver/cdp:generate-v116
echo "Generating CDP code for version 119"
bazel build //dotnet/src/webdriver/cdp:generate-v119
fi

if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/cdp/v117/DevToolsSessionDomains.cs" ]]
Expand Down
Expand Up @@ -20,7 +20,7 @@ public StableChannelChromeDriver(ChromeDriverService service, ChromeOptions opti

public static ChromeOptions DefaultOptions
{
get { return new ChromeOptions() { BrowserVersion = "118" }; }
get { return new ChromeOptions() { BrowserVersion = "119" }; }
}
}
}
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsConsoleTest.cs
Expand Up @@ -6,7 +6,7 @@

namespace OpenQA.Selenium.DevTools
{
using CurrentCdpVersion = V118;
using CurrentCdpVersion = V119;

[TestFixture]
public class DevToolsConsoleTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsLogTest.cs
Expand Up @@ -6,7 +6,7 @@

namespace OpenQA.Selenium.DevTools
{
using CurrentCdpVersion = V118;
using CurrentCdpVersion = V119;

[TestFixture]
public class DevToolsLogTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsNetworkTest.cs
Expand Up @@ -6,7 +6,7 @@

namespace OpenQA.Selenium.DevTools
{
using CurrentCdpVersion = V118;
using CurrentCdpVersion = V119;

[TestFixture]
public class DevToolsNetworkTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsPerformanceTest.cs
Expand Up @@ -3,7 +3,7 @@

namespace OpenQA.Selenium.DevTools
{
using CurrentCdpVersion = V118;
using CurrentCdpVersion = V119;

[TestFixture]
public class DevToolsPerformanceTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsProfilerTest.cs
Expand Up @@ -5,7 +5,7 @@

namespace OpenQA.Selenium.DevTools
{
using CurrentCdpVersion = V118;
using CurrentCdpVersion = V119;

[TestFixture]
public class DevToolsProfilerTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsSecurityTest.cs
Expand Up @@ -6,7 +6,7 @@

namespace OpenQA.Selenium.DevTools
{
using CurrentCdpVersion = V118;
using CurrentCdpVersion = V119;

[TestFixture]
public class DevToolsSecurityTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsTargetTest.cs
Expand Up @@ -6,7 +6,7 @@

namespace OpenQA.Selenium.DevTools
{
using CurrentCdpVersion = V118;
using CurrentCdpVersion = V119;

[TestFixture]
public class DevToolsTargetTest : DevToolsTestFixture
Expand Down
Expand Up @@ -2,7 +2,7 @@ load("//common:defs.bzl", "copy_file")
load("//java:defs.bzl", "java_export", "java_library")
load("//java:version.bzl", "SE_VERSION")

cdp_version = "v116"
cdp_version = "v119"

java_export(
name = cdp_version,
Expand Down
Expand Up @@ -15,15 +15,15 @@
// specific language governing permissions and limitations
// under the License.

package org.openqa.selenium.devtools.v116;
package org.openqa.selenium.devtools.v119;

import com.google.auto.service.AutoService;
import org.openqa.selenium.devtools.CdpInfo;

@AutoService(CdpInfo.class)
public class v116CdpInfo extends CdpInfo {
public class v119CdpInfo extends CdpInfo {

public v116CdpInfo() {
super(116, v116Domains::new);
public v119CdpInfo() {
super(119, v119Domains::new);
}
}

0 comments on commit 19e3585

Please sign in to comment.