Skip to content

Commit

Permalink
And set CDP to v128
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Sep 10, 2024
1 parent 8c23851 commit 03ec6c8
Showing 1 changed file with 7 additions and 7 deletions.
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

0 comments on commit 03ec6c8

Please sign in to comment.