diff --git a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs index 63544fbe1dc04..784c47305c5ca 100644 --- a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs +++ b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs @@ -19,11 +19,11 @@ public class DevToolsConsoleTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyMessageAdded() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); string consoleMessage = "Hello Selenium"; ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler messageAddedHandler = (sender, e) => + EventHandler messageAddedHandler = (sender, e) => { Assert.That(e.Message.Text, Is.EqualTo(consoleMessage)); sync.Set(); diff --git a/dotnet/test/common/DevTools/DevToolsLogTest.cs b/dotnet/test/common/DevTools/DevToolsLogTest.cs index 73484e8979d19..502a2aa500bb1 100644 --- a/dotnet/test/common/DevTools/DevToolsLogTest.cs +++ b/dotnet/test/common/DevTools/DevToolsLogTest.cs @@ -19,12 +19,12 @@ public class DevToolsLogTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyEntryAddedAndClearLog() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler entryAddedHandler = (sender, e) => + EventHandler entryAddedHandler = (sender, e) => { Assert.That(e.Entry.Text.Contains("404")); - Assert.That(e.Entry.Level == V91.Log.LogEntryLevelValues.Error); + Assert.That(e.Entry.Level == V93.Log.LogEntryLevelValues.Error); sync.Set(); }; diff --git a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs index 4956c454a67ea..3b6e3df7b9d15 100644 --- a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs +++ b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs @@ -21,8 +21,8 @@ public class DevToolsNetworkTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public void GetSetDeleteAndClearAllCookies() { - //var domains = session.GetVersionSpecificDomains(); - //await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + //var domains = session.GetVersionSpecificDomains(); + //await domains.Network.Enable(new V93.Network.EnableCommandSettings()); //var allCookieResponse = await domains.Network.GetAllCookies(); //ReadOnlyCollection seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); @@ -37,11 +37,11 @@ public void GetSetDeleteAndClearAllCookies() //seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); //Assert.That(seleniumCookies.Count == 1); - //var cookieResponse = await domains.Network.GetCookies(new V91.Network.GetCookiesCommandSettings()); + //var cookieResponse = await domains.Network.GetCookies(new V93.Network.GetCookiesCommandSettings()); //seleniumCookies = cookieResponse.Cookies.ToSeleniumCookies(); //Assert.That(seleniumCookies.Count == 0); - //await domains.Network.DeleteCookies(new V91.Network.DeleteCookiesCommandSettings() + //await domains.Network.DeleteCookies(new V93.Network.DeleteCookiesCommandSettings() //{ // Name = "name", // Domain = EnvironmentManager.Instance.UrlBuilder.HostName, @@ -69,26 +69,26 @@ public void GetSetDeleteAndClearAllCookies() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SendRequestWithUrlFiltersAndExtraHeadersAndVerifyRequests() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); - await domains.Network.SetBlockedURLs(new V91.Network.SetBlockedURLsCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); + await domains.Network.SetBlockedURLs(new V93.Network.SetBlockedURLsCommandSettings() { Urls = new string[] { "*://*/*.css" } }); - var additionalHeaders = new V91.Network.Headers(); + var additionalHeaders = new V93.Network.Headers(); additionalHeaders.Add("headerName", "headerValue"); - await domains.Network.SetExtraHTTPHeaders(new V91.Network.SetExtraHTTPHeadersCommandSettings() + await domains.Network.SetExtraHTTPHeaders(new V93.Network.SetExtraHTTPHeadersCommandSettings() { Headers = additionalHeaders }); ManualResetEventSlim loadingFailedSync = new ManualResetEventSlim(false); - EventHandler loadingFailedHandler = (sender, e) => + EventHandler loadingFailedHandler = (sender, e) => { - if (e.Type == V91.Network.ResourceType.Stylesheet) + if (e.Type == V93.Network.ResourceType.Stylesheet) { - Assert.That(e.BlockedReason == V91.Network.BlockedReason.Inspector); + Assert.That(e.BlockedReason == V93.Network.BlockedReason.Inspector); } loadingFailedSync.Set(); @@ -96,7 +96,7 @@ await domains.Network.SetExtraHTTPHeaders(new V91.Network.SetExtraHTTPHeadersCom domains.Network.LoadingFailed += loadingFailedHandler; ManualResetEventSlim requestSentSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e.Request.Headers.ContainsKey("headerName")); Assert.That(e.Request.Headers["headerName"] == "headerValue"); @@ -105,12 +105,12 @@ await domains.Network.SetExtraHTTPHeaders(new V91.Network.SetExtraHTTPHeadersCom domains.Network.RequestWillBeSent += requestWillBeSentHandler; ManualResetEventSlim dataSync = new ManualResetEventSlim(false); - EventHandler dataReceivedHandler = (sender, e) => + EventHandler dataReceivedHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); dataSync.Set(); }; - domains.Network.DataReceived += dataReceivedHandler; + domains.Network.DataReceived += dataReceivedHandler; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("js/skins/lightgray/content.min.css"); loadingFailedSync.Wait(TimeSpan.FromSeconds(5)); @@ -125,23 +125,23 @@ await domains.Network.SetExtraHTTPHeaders(new V91.Network.SetExtraHTTPHeadersCom [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task EmulateNetworkConditionOffline() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings() { MaxTotalBufferSize = 100000000 }); - await domains.Network.EmulateNetworkConditions(new V91.Network.EmulateNetworkConditionsCommandSettings() + await domains.Network.EmulateNetworkConditions(new V93.Network.EmulateNetworkConditionsCommandSettings() { Offline = true, Latency = 100, DownloadThroughput = 1000, UploadThroughput = 2000, - ConnectionType = V91.Network.ConnectionType.Cellular3g + ConnectionType = V93.Network.ConnectionType.Cellular3g }); ManualResetEventSlim loadingFailedSync = new ManualResetEventSlim(false); - EventHandler loadingFailedHandler = (sender, e) => + EventHandler loadingFailedHandler = (sender, e) => { Assert.That(e.ErrorText, Is.EqualTo("net::ERR_INTERNET_DISCONNECTED")); loadingFailedSync.Set(); @@ -159,16 +159,16 @@ await domains.Network.EmulateNetworkConditions(new V91.Network.EmulateNetworkCon [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyRequestReceivedFromCacheAndResponseBody() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); string[] requestIdFromCache = new string[1]; - await domains.Network.Enable(new V91.Network.EnableCommandSettings() + await domains.Network.Enable(new V93.Network.EnableCommandSettings() { MaxResourceBufferSize = 100000000 }); ManualResetEventSlim servedFromCacheSync = new ManualResetEventSlim(false); - EventHandler requestServedFromCacheHandler = (sender, e) => + EventHandler requestServedFromCacheHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); requestIdFromCache[0] = e.RequestId; @@ -177,7 +177,7 @@ await domains.Network.Enable(new V91.Network.EnableCommandSettings() domains.Network.RequestServedFromCache += requestServedFromCacheHandler; ManualResetEventSlim loadingFinishedSync = new ManualResetEventSlim(false); - EventHandler loadingFinishedHandler = (sender, e) => + EventHandler loadingFinishedHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); loadingFinishedSync.Set(); @@ -189,7 +189,7 @@ await domains.Network.Enable(new V91.Network.EnableCommandSettings() loadingFinishedSync.Wait(TimeSpan.FromSeconds(5)); servedFromCacheSync.Wait(TimeSpan.FromSeconds(5)); - var responseBody = await domains.Network.GetResponseBody(new V91.Network.GetResponseBodyCommandSettings() + var responseBody = await domains.Network.GetResponseBody(new V93.Network.GetResponseBodyCommandSettings() { RequestId = requestIdFromCache[0] }); @@ -204,16 +204,16 @@ await domains.Network.Enable(new V91.Network.EnableCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifySearchInResponseBody() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); string[] requestIds = new string[1]; - await domains.Network.Enable(new V91.Network.EnableCommandSettings() + await domains.Network.Enable(new V93.Network.EnableCommandSettings() { MaxResourceBufferSize = 100000000 }); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestIds[0] = e.RequestId; @@ -224,7 +224,7 @@ await domains.Network.Enable(new V91.Network.EnableCommandSettings() driver.Url = simpleTestPage; responseSync.Wait(TimeSpan.FromSeconds(5)); - var searchResponse = await domains.Network.SearchInResponseBody(new V91.Network.SearchInResponseBodyCommandSettings() + var searchResponse = await domains.Network.SearchInResponseBody(new V93.Network.SearchInResponseBodyCommandSettings() { RequestId = requestIds[0], Query = "/", @@ -240,14 +240,14 @@ await domains.Network.Enable(new V91.Network.EnableCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyCacheDisabledAndClearCache() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings() { MaxPostDataSize = 100000000 }); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e.Response.FromDiskCache, Is.False); responseSync.Set(); @@ -257,7 +257,7 @@ await domains.Network.Enable(new V91.Network.EnableCommandSettings() driver.Url = simpleTestPage; responseSync.Wait(TimeSpan.FromSeconds(5)); - await domains.Network.SetCacheDisabled(new V91.Network.SetCacheDisabledCommandSettings() + await domains.Network.SetCacheDisabled(new V93.Network.SetCacheDisabledCommandSettings() { CacheDisabled = true }); @@ -273,16 +273,16 @@ await domains.Network.SetCacheDisabled(new V91.Network.SetCacheDisabledCommandSe [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyCertificatesAndOverrideUserAgent() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); - await domains.Network.SetUserAgentOverride(new V91.Network.SetUserAgentOverrideCommandSettings() + await domains.Network.SetUserAgentOverride(new V93.Network.SetUserAgentOverrideCommandSettings() { UserAgent = "userAgent" }); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e.Request.Headers["User-Agent"], Is.EqualTo("userAgent")); requestSync.Set(); @@ -293,7 +293,7 @@ await domains.Network.SetUserAgentOverride(new V91.Network.SetUserAgentOverrideC driver.Url = origin; requestSync.Wait(TimeSpan.FromSeconds(5)); - var result = await domains.Network.GetCertificate(new V91.Network.GetCertificateCommandSettings() + var result = await domains.Network.GetCertificate(new V93.Network.GetCertificateCommandSettings() { Origin = origin }); @@ -308,10 +308,10 @@ await domains.Network.SetUserAgentOverride(new V91.Network.SetUserAgentOverrideC [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyResponseReceivedEventAndNetworkDisable() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); responseSync.Set(); @@ -330,34 +330,34 @@ public async Task VerifyResponseReceivedEventAndNetworkDisable() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyWebSocketOperations() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); - EventHandler webSocketCreatedHandler = (sender, e) => + EventHandler webSocketCreatedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketCreated += webSocketCreatedHandler; - EventHandler webSocketFrameReceivedHandler = (sender, e) => + EventHandler webSocketFrameReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketFrameReceived += webSocketFrameReceivedHandler; - EventHandlerwebSocketFrameErrorHandler = (sender, e) => + EventHandlerwebSocketFrameErrorHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketFrameError += webSocketFrameErrorHandler; - EventHandler webSocketFrameSentHandler = (sender, e) => + EventHandler webSocketFrameSentHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; domains.Network.WebSocketFrameSent += webSocketFrameSentHandler; - EventHandler webSocketClosedHandler = (sender, e) => + EventHandler webSocketClosedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; @@ -373,13 +373,13 @@ public async Task VerifyWebSocketOperations() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyRequestPostData() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); string[] requestIds = new string[1]; ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e, Is.Not.Null); if (string.Compare(e.Request.Method, "post", StringComparison.OrdinalIgnoreCase) == 0) @@ -394,7 +394,7 @@ public async Task VerifyRequestPostData() driver.FindElement(By.XPath("//form/input")).Click(); requestSync.Wait(TimeSpan.FromSeconds(5)); - var response = await domains.Network.GetRequestPostData(new V91.Network.GetRequestPostDataCommandSettings() + var response = await domains.Network.GetRequestPostData(new V93.Network.GetRequestPostDataCommandSettings() { RequestId = requestIds[0] }); @@ -409,9 +409,9 @@ public async Task VerifyRequestPostData() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task ByPassServiceWorker() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); - await domains.Network.SetBypassServiceWorker(new V91.Network.SetBypassServiceWorkerCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); + await domains.Network.SetBypassServiceWorker(new V93.Network.SetBypassServiceWorkerCommandSettings() { Bypass = true }); @@ -424,10 +424,10 @@ await domains.Network.SetBypassServiceWorker(new V91.Network.SetBypassServiceWor [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task DataSizeLimitsForTest() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); - await domains.Network.SetDataSizeLimitsForTest(new V91.Network.SetDataSizeLimitsForTestCommandSettings() + await domains.Network.SetDataSizeLimitsForTest(new V93.Network.SetDataSizeLimitsForTestCommandSettings() { MaxResourceSize = 10000, MaxTotalSize = 100000 @@ -441,11 +441,11 @@ await domains.Network.SetDataSizeLimitsForTest(new V91.Network.SetDataSizeLimits [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyEventSourceMessage() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler eventSourceMessageReceivedHandler = (sender, e) => + EventHandler eventSourceMessageReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); @@ -463,11 +463,11 @@ public async Task VerifyEventSourceMessage() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifySignedExchangeReceived() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler signedExchangeReceivedHandler = (sender, e) => + EventHandler signedExchangeReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); @@ -485,11 +485,11 @@ public async Task VerifySignedExchangeReceived() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyResourceChangedPriority() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler resourceChangedPriorityHandler = (sender, e) => + EventHandler resourceChangedPriorityHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); @@ -507,13 +507,13 @@ public async Task VerifyResourceChangedPriority() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task InterceptRequestAndContinue() { - var domains = session.GetVersionSpecificDomains(); - await domains.Network.Enable(new V91.Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V93.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestInterceptedHandler = (async (sender, e) => + EventHandler requestInterceptedHandler = (async (sender, e) => { - await domains.Network.ContinueInterceptedRequest(new V91.Network.ContinueInterceptedRequestCommandSettings() + await domains.Network.ContinueInterceptedRequest(new V93.Network.ContinueInterceptedRequestCommandSettings() { InterceptionId = e.InterceptionId }); @@ -521,16 +521,16 @@ await domains.Network.ContinueInterceptedRequest(new V91.Network.ContinueInterce }); domains.Network.RequestIntercepted += requestInterceptedHandler; - var pattern = new V91.Network.RequestPattern() + var pattern = new V93.Network.RequestPattern() { UrlPattern = "*.css", - ResourceType = V91.Network.ResourceType.Stylesheet, - InterceptionStage = V91.Network.InterceptionStage.HeadersReceived + ResourceType = V93.Network.ResourceType.Stylesheet, + InterceptionStage = V93.Network.InterceptionStage.HeadersReceived }; - await domains.Network.SetRequestInterception(new V91.Network.SetRequestInterceptionCommandSettings() + await domains.Network.SetRequestInterception(new V93.Network.SetRequestInterceptionCommandSettings() { - Patterns = new V91.Network.RequestPattern[] { pattern } + Patterns = new V93.Network.RequestPattern[] { pattern } }); driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("js/skins/lightgray/content.min.css"); diff --git a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs index c70bf19ea4ea2..b37b2c44008fe 100644 --- a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs +++ b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs @@ -18,8 +18,8 @@ public class DevToolsPerformanceTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task EnableAndDisablePerformance() { - var domains = session.GetVersionSpecificDomains(); - await domains.Performance.Enable(new V91.Performance.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.Enable(new V93.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; await domains.Performance.Disable(); } @@ -31,7 +31,7 @@ public async Task EnableAndDisablePerformance() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task DisablePerformance() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Performance.Disable(); driver.Url = simpleTestPage; await domains.Performance.Disable(); @@ -44,13 +44,13 @@ public async Task DisablePerformance() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SetTimeDomainTimeTickPerformance() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Performance.Disable(); - await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings() + await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings() { TimeDomain = "timeTicks" }); - await domains.Performance.Enable(new V91.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V93.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; await domains.Performance.Disable(); } @@ -62,13 +62,13 @@ await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommand [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SetTimeDomainsThreadTicksPerformance() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Performance.Disable(); - await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings() + await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings() { TimeDomain = "threadTicks" }); - await domains.Performance.Enable(new V91.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V93.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; await domains.Performance.Disable(); } @@ -80,12 +80,12 @@ await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommand [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetMetricsByTimeTicks() { - var domains = session.GetVersionSpecificDomains(); - await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings() { TimeDomain = "timeTicks" }); - await domains.Performance.Enable(new V91.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V93.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; var response = await domains.Performance.GetMetrics(); var metrics = response.Metrics; @@ -101,12 +101,12 @@ await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommand [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetMetricsByThreadTicks() { - var domains = session.GetVersionSpecificDomains(); - await domains.Performance.SetTimeDomain(new V91.Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.SetTimeDomain(new V93.Performance.SetTimeDomainCommandSettings() { TimeDomain = "threadTicks" }); - await domains.Performance.Enable(new V91.Performance.EnableCommandSettings()); + await domains.Performance.Enable(new V93.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; var response = await domains.Performance.GetMetrics(); var metrics = response.Metrics; diff --git a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs index 0c5e20ce32e26..cf2ad8d3ca9a7 100644 --- a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs +++ b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs @@ -18,7 +18,7 @@ public class DevToolsProfilerTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SimpleStartStopAndGetProfilerTest() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); await domains.Profiler.Start(); var response = await domains.Profiler.Stop(); @@ -34,10 +34,10 @@ public async Task SimpleStartStopAndGetProfilerTest() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleGetBestEffortProfilerTest() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); driver.Url = simpleTestPage; - await domains.Profiler.SetSamplingInterval(new V91.Profiler.SetSamplingIntervalCommandSettings() + await domains.Profiler.SetSamplingInterval(new V93.Profiler.SetSamplingIntervalCommandSettings() { Interval = 30 }); @@ -56,10 +56,10 @@ await domains.Profiler.SetSamplingInterval(new V91.Profiler.SetSamplingIntervalC [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleSetStartPreciseCoverageTest() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); driver.Url = simpleTestPage; - await domains.Profiler.StartPreciseCoverage(new V91.Profiler.StartPreciseCoverageCommandSettings() + await domains.Profiler.StartPreciseCoverage(new V93.Profiler.StartPreciseCoverageCommandSettings() { CallCount = true, Detailed = true @@ -82,11 +82,11 @@ await domains.Profiler.StartPreciseCoverage(new V91.Profiler.StartPreciseCoverag [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleProfileEvents() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Profiler.Enable(); driver.Url = simpleTestPage; ManualResetEventSlim startSync = new ManualResetEventSlim(false); - EventHandler consoleProfileStartedHandler = (sender, e) => + EventHandler consoleProfileStartedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); startSync.Set(); @@ -99,7 +99,7 @@ public async Task SampleProfileEvents() driver.Navigate().Refresh(); ManualResetEventSlim finishSync = new ManualResetEventSlim(false); - EventHandler consoleProfileFinishedHandler = (sender, e) => + EventHandler consoleProfileFinishedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); finishSync.Set(); @@ -115,7 +115,7 @@ public async Task SampleProfileEvents() await domains.Profiler.Disable(); } - private void ValidateProfile(V91.Profiler.Profile profiler) + private void ValidateProfile(V93.Profiler.Profile profiler) { Assert.That(profiler, Is.Not.Null); Assert.That(profiler.Nodes, Is.Not.Null); diff --git a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs index e0aed0d13f9c9..981c63296f176 100644 --- a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs +++ b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs @@ -19,17 +19,17 @@ public class DevToolsSecurityTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task LoadInsecureWebsite() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Security.Enable(); - await domains.Security.SetIgnoreCertificateErrors(new V91.Security.SetIgnoreCertificateErrorsCommandSettings() + await domains.Security.SetIgnoreCertificateErrors(new V93.Security.SetIgnoreCertificateErrorsCommandSettings() { Ignore = false }); string summary = null; ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler securityStateChangedHandler = (sender, e) => + EventHandler securityStateChangedHandler = (sender, e) => { summary = e.Summary; sync.Set(); @@ -52,10 +52,10 @@ await domains.Security.SetIgnoreCertificateErrors(new V91.Security.SetIgnoreCert [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task LoadSecureWebsite() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); await domains.Security.Enable(); - await domains.Security.SetIgnoreCertificateErrors(new V91.Security.SetIgnoreCertificateErrorsCommandSettings() + await domains.Security.SetIgnoreCertificateErrors(new V93.Security.SetIgnoreCertificateErrorsCommandSettings() { Ignore = true }); diff --git a/dotnet/test/common/DevTools/DevToolsTargetTest.cs b/dotnet/test/common/DevTools/DevToolsTargetTest.cs index f6c6344538b9d..e4cbb383b4e1a 100644 --- a/dotnet/test/common/DevTools/DevToolsTargetTest.cs +++ b/dotnet/test/common/DevTools/DevToolsTargetTest.cs @@ -21,24 +21,24 @@ public class DevToolsTargetTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetTargetActivateAndAttach() { - var domains = session.GetVersionSpecificDomains(); + var domains = session.GetVersionSpecificDomains(); driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"); var response = await domains.Target.GetTargets(); - V91.Target.TargetInfo[] allTargets = response.TargetInfos; - foreach (V91.Target.TargetInfo targetInfo in allTargets) + V93.Target.TargetInfo[] allTargets = response.TargetInfos; + foreach (V93.Target.TargetInfo targetInfo in allTargets) { ValidateTarget(targetInfo); - await domains.Target.ActivateTarget(new V91.Target.ActivateTargetCommandSettings() + await domains.Target.ActivateTarget(new V93.Target.ActivateTargetCommandSettings() { TargetId = targetInfo.TargetId }); - var attachResponse = await domains.Target.AttachToTarget(new V91.Target.AttachToTargetCommandSettings() + var attachResponse = await domains.Target.AttachToTarget(new V93.Target.AttachToTargetCommandSettings() { TargetId = targetInfo.TargetId, Flatten = true }); ValidateSession(attachResponse.SessionId); - var getInfoResponse = await domains.Target.GetTargetInfo(new V91.Target.GetTargetInfoCommandSettings() + var getInfoResponse = await domains.Target.GetTargetInfo(new V93.Target.GetTargetInfoCommandSettings() { TargetId = targetInfo.TargetId }); @@ -53,10 +53,10 @@ await domains.Target.ActivateTarget(new V91.Target.ActivateTargetCommandSettings [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetTargetAndSendMessageToTarget() { - var domains = session.GetVersionSpecificDomains(); - V91.Target.TargetInfo[] allTargets = null; + var domains = session.GetVersionSpecificDomains(); + V93.Target.TargetInfo[] allTargets = null; string sessionId = null; - V91.Target.TargetInfo targetInfo = null; + V93.Target.TargetInfo targetInfo = null; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"); ManualResetEventSlim sync = new ManualResetEventSlim(false); domains.Target.ReceivedMessageFromTarget += (sender, e) => @@ -69,19 +69,19 @@ public async Task GetTargetAndSendMessageToTarget() ValidateTargetsInfos(allTargets); ValidateTarget(allTargets[0]); targetInfo = allTargets[0]; - await domains.Target.ActivateTarget(new V91.Target.ActivateTargetCommandSettings() + await domains.Target.ActivateTarget(new V93.Target.ActivateTargetCommandSettings() { TargetId = targetInfo.TargetId }); - var attachResponse = await domains.Target.AttachToTarget(new V91.Target.AttachToTargetCommandSettings() + var attachResponse = await domains.Target.AttachToTarget(new V93.Target.AttachToTargetCommandSettings() { TargetId = targetInfo.TargetId, Flatten = false }); sessionId = attachResponse.SessionId; ValidateSession(sessionId); - await domains.Target.SendMessageToTarget(new V91.Target.SendMessageToTargetCommandSettings() + await domains.Target.SendMessageToTarget(new V93.Target.SendMessageToTargetCommandSettings() { Message = "{\"id\":" + id + ",\"method\":\"Page.bringToFront\"}", SessionId = sessionId, @@ -97,32 +97,32 @@ await domains.Target.SendMessageToTarget(new V91.Target.SendMessageToTargetComma [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task CreateAndContentLifeCycle() { - var domains = session.GetVersionSpecificDomains(); - EventHandler targetCreatedHandler = (sender, e) => + var domains = session.GetVersionSpecificDomains(); + EventHandler targetCreatedHandler = (sender, e) => { ValidateTargetInfo(e.TargetInfo); }; domains.Target.TargetCreated += targetCreatedHandler; - EventHandler targetCrashedHandler = (sender, e) => + EventHandler targetCrashedHandler = (sender, e) => { ValidateTargetCrashed(e); }; domains.Target.TargetCrashed += targetCrashedHandler; - EventHandler targetDestroyedHandler = (sender, e) => + EventHandler targetDestroyedHandler = (sender, e) => { ValidateTargetId(e.TargetId); }; domains.Target.TargetDestroyed += targetDestroyedHandler; - EventHandler targetInfoChangedHandler = (sender, e) => + EventHandler targetInfoChangedHandler = (sender, e) => { ValidateTargetInfo(e.TargetInfo); }; domains.Target.TargetInfoChanged += targetInfoChangedHandler; - var response = await domains.Target.CreateTarget(new V91.Target.CreateTargetCommandSettings() + var response = await domains.Target.CreateTarget(new V93.Target.CreateTargetCommandSettings() { Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"), NewWindow = true, @@ -130,12 +130,12 @@ public async Task CreateAndContentLifeCycle() }); ValidateTargetId(response.TargetId); - await domains.Target.SetDiscoverTargets(new V91.Target.SetDiscoverTargetsCommandSettings() + await domains.Target.SetDiscoverTargets(new V93.Target.SetDiscoverTargetsCommandSettings() { Discover = true }); - var closeResponse = await domains.Target.CloseTarget(new V91.Target.CloseTargetCommandSettings() + var closeResponse = await domains.Target.CloseTarget(new V93.Target.CloseTargetCommandSettings() { TargetId = response.TargetId }); @@ -144,7 +144,7 @@ await domains.Target.SetDiscoverTargets(new V91.Target.SetDiscoverTargetsCommand Assert.That(closeResponse.Success, Is.True); } - private void ValidateTargetCrashed(V91.Target.TargetCrashedEventArgs targetCrashed) + private void ValidateTargetCrashed(V93.Target.TargetCrashedEventArgs targetCrashed) { Assert.That(targetCrashed, Is.Not.Null); Assert.That(targetCrashed.ErrorCode, Is.Not.Null); @@ -157,7 +157,7 @@ private void ValidateTargetId(string targetId) Assert.That(targetId, Is.Not.Null); } - private void ValidateMessage(V91.Target.ReceivedMessageFromTargetEventArgs messageFromTarget) + private void ValidateMessage(V93.Target.ReceivedMessageFromTargetEventArgs messageFromTarget) { Assert.That(messageFromTarget, Is.Not.Null); Assert.That(messageFromTarget.Message, Is.Not.Null); @@ -165,7 +165,7 @@ private void ValidateMessage(V91.Target.ReceivedMessageFromTargetEventArgs messa Assert.That(messageFromTarget.Message, Is.EqualTo("{\"id\":" + id + ",\"result\":{}}")); } - private void ValidateTargetInfo(V91.Target.TargetInfo targetInfo) + private void ValidateTargetInfo(V93.Target.TargetInfo targetInfo) { Assert.That(targetInfo, Is.Not.Null); Assert.That(targetInfo.TargetId, Is.Not.Null); @@ -174,13 +174,13 @@ private void ValidateTargetInfo(V91.Target.TargetInfo targetInfo) Assert.That(targetInfo.Url, Is.Not.Null); } - private void ValidateTargetsInfos(V91.Target.TargetInfo[] targets) + private void ValidateTargetsInfos(V93.Target.TargetInfo[] targets) { Assert.That(targets, Is.Not.Null); Assert.That(targets.Length, Is.GreaterThan(0)); } - private void ValidateTarget(V91.Target.TargetInfo targetInfo) + private void ValidateTarget(V93.Target.TargetInfo targetInfo) { Assert.That(targetInfo, Is.Not.Null); Assert.That(targetInfo.TargetId, Is.Not.Null);