Skip to content

Commit f0185d7

Browse files
committed
[.net] update code samples to use v132 devtools
1 parent 095529d commit f0185d7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
using OpenQA.Selenium;
55
using OpenQA.Selenium.DevTools;
66
using System.Linq;
7-
using OpenQA.Selenium.DevTools.V131.Network;
8-
using OpenQA.Selenium.DevTools.V131.Performance;
7+
using OpenQA.Selenium.DevTools.V132.Network;
8+
using OpenQA.Selenium.DevTools.V132.Performance;
99

1010

1111
namespace SeleniumDocs.BiDi.CDP
@@ -16,7 +16,7 @@ public class NetworkTest : BaseTest
1616
[TestInitialize]
1717
public void Startup()
1818
{
19-
StartDriver("131");
19+
StartDriver("132");
2020
}
2121

2222
[TestMethod]
@@ -37,7 +37,7 @@ public async Task BasicAuthentication()
3737
Assert.AreEqual("Congratulations! You must have the proper credentials.",
3838
driver.FindElement(By.TagName("p")).Text);
3939
}
40-
40+
4141
[TestMethod]
4242
public async Task RecordNetworkResponse()
4343
{
@@ -102,16 +102,16 @@ public async Task TransformNetworkRequest()
102102

103103
Assert.AreEqual("two", driver.FindElement(By.Id("result")).Text);
104104
}
105-
105+
106106
[TestMethod]
107107
public async Task PerformanceMetrics()
108108
{
109109
driver.Url = "https://www.selenium.dev/selenium/web/frameset.html";
110110

111111
var session = ((IDevTools)driver).GetDevToolsSession();
112-
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V131.DevToolsSessionDomains>();
112+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V132.DevToolsSessionDomains>();
113113

114-
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V131.Performance.EnableCommandSettings());
114+
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V132.Performance.EnableCommandSettings());
115115
var metricsResponse =
116116
await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
117117
new GetMetricsCommandSettings()
@@ -130,8 +130,8 @@ await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
130130
public async Task SetCookie()
131131
{
132132
var session = ((IDevTools)driver).GetDevToolsSession();
133-
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V131.DevToolsSessionDomains>();
134-
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V131.Network.EnableCommandSettings());
133+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V132.DevToolsSessionDomains>();
134+
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V132.Network.EnableCommandSettings());
135135

136136
var cookieCommandSettings = new SetCookieCommandSettings
137137
{

0 commit comments

Comments
 (0)