From 8c238511513eac6c0fa1777ad78c0bf7b82a93cd Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:49:08 +0300 Subject: [PATCH 1/2] Use .net 8 SDK to run dotnet examples --- .github/workflows/dotnet-examples.yml | 4 ++-- examples/dotnet/SeleniumDocs/SeleniumDocs.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet-examples.yml b/.github/workflows/dotnet-examples.yml index 448219ad3d7f..1bf2c7c49778 100644 --- a/.github/workflows/dotnet-examples.yml +++ b/.github/workflows/dotnet-examples.yml @@ -48,12 +48,12 @@ jobs: if: matrix.release == 'stable' uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.x + dotnet-version: 8.x - name: Set up .Net Nightly if: matrix.release == 'nightly' uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.x + dotnet-version: 8.x source-url: https://nuget.pkg.github.com/seleniumhq/index.json env: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj b/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj index 9bc3fb61e12f..9a46127a58f9 100644 --- a/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj +++ b/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false From 03ec6c8bff34766de030adc679ab9705ff8ec0f7 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:52:37 +0300 Subject: [PATCH 2/2] And set CDP to v128 --- .../dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs b/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs index 5ed1b236d272..9f4274c5541f 100644 --- a/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs +++ b/examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs @@ -4,8 +4,8 @@ using OpenQA.Selenium; using OpenQA.Selenium.DevTools; using System.Linq; -using OpenQA.Selenium.DevTools.V127.Network; -using OpenQA.Selenium.DevTools.V127.Performance; +using OpenQA.Selenium.DevTools.V128.Network; +using OpenQA.Selenium.DevTools.V128.Performance; namespace SeleniumDocs.BiDi.CDP @@ -16,7 +16,7 @@ public class NetworkTest : BaseTest [TestInitialize] public void Startup() { - StartDriver("127"); + StartDriver("128"); } [TestMethod] @@ -109,9 +109,9 @@ public async Task PerformanceMetrics() driver.Url = "https://www.selenium.dev/selenium/web/frameset.html"; var session = ((IDevTools)driver).GetDevToolsSession(); - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); - await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V127.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V128.Performance.EnableCommandSettings()); var metricsResponse = await session.SendCommand( new GetMetricsCommandSettings() @@ -130,8 +130,8 @@ await session.SendCommand( public async Task SetCookie() { var session = ((IDevTools)driver).GetDevToolsSession(); - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new OpenQA.Selenium.DevTools.V127.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new OpenQA.Selenium.DevTools.V128.Network.EnableCommandSettings()); var cookieCommandSettings = new SetCookieCommandSettings {