Skip to content

Use .net 8 SDK to run dotnet examples #1933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
14 changes: 7 additions & 7 deletions examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,7 +16,7 @@ public class NetworkTest : BaseTest
[TestInitialize]
public void Startup()
{
StartDriver("127");
StartDriver("128");
}

[TestMethod]
Expand Down Expand Up @@ -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<OpenQA.Selenium.DevTools.V127.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V128.DevToolsSessionDomains>();

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<GetMetricsCommandSettings, GetMetricsCommandResponse>(
new GetMetricsCommandSettings()
Expand All @@ -130,8 +130,8 @@ await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
public async Task SetCookie()
{
var session = ((IDevTools)driver).GetDevToolsSession();
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V127.DevToolsSessionDomains>();
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V127.Network.EnableCommandSettings());
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V128.DevToolsSessionDomains>();
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V128.Network.EnableCommandSettings());

var cookieCommandSettings = new SetCookieCommandSettings
{
Expand Down
2 changes: 1 addition & 1 deletion examples/dotnet/SeleniumDocs/SeleniumDocs.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>

Expand Down
Loading