From 451b0637330ba3f7ceac3616b96566eac0f41465 Mon Sep 17 00:00:00 2001 From: Jim Evans Date: Sat, 1 Jun 2019 07:57:32 -0700 Subject: [PATCH] Adding more custom driver configs to .NET tests for Bazel migration --- dotnet/test/common/AlertsTest.cs | 22 ++++----- dotnet/test/common/AvailableLogsTest.cs | 4 +- dotnet/test/common/Browser.cs | 2 +- dotnet/test/common/ClearTest.cs | 6 +-- dotnet/test/common/ClickScrollingTest.cs | 2 +- dotnet/test/common/ClickTest.cs | 2 +- dotnet/test/common/ContentEditableTest.cs | 6 +-- .../test/common/CookieImplementationTest.cs | 6 +-- dotnet/test/common/CorrectEventFiringTest.cs | 8 ++-- .../CustomDriverConfigs/ChromiumEdgeDriver.cs | 35 ++++++++++++++ .../CustomDriverConfigs/DefaultEdgeDriver.cs | 31 +++++++++++++ .../SpecCompliantChromeDriver.cs | 25 ++++++++++ .../IgnoreBrowserAttribute.cs | 2 +- dotnet/test/common/ElementFindingTest.cs | 8 ++-- .../test/common/Environment/DriverFactory.cs | 6 +-- .../common/ExecutingAsyncJavascriptTest.cs | 6 +-- dotnet/test/common/ExecutingJavascriptTest.cs | 10 ++-- dotnet/test/common/FrameSwitchingTest.cs | 2 +- dotnet/test/common/GetLogsTest.cs | 2 +- .../test/common/HTML5/LocationContextTest.cs | 4 +- dotnet/test/common/I18Test.cs | 2 +- .../Interactions/BasicMouseInterfaceTest.cs | 4 +- dotnet/test/common/MiscTest.cs | 4 +- dotnet/test/common/PageLoadingTest.cs | 14 +++--- dotnet/test/common/ProxySettingTest.cs | 8 ++-- dotnet/test/common/SvgDocumentTest.cs | 2 +- dotnet/test/common/TakesScreenshotTest.cs | 20 ++++---- dotnet/test/common/TextPagesTest.cs | 4 +- dotnet/test/common/TypingTest.cs | 2 +- dotnet/test/common/UploadTest.cs | 10 ++-- dotnet/test/common/WindowSwitchingTest.cs | 2 +- dotnet/test/common/WindowTest.cs | 4 +- dotnet/test/common/appconfig.json | 46 ++++++------------- 33 files changed, 191 insertions(+), 120 deletions(-) create mode 100644 dotnet/test/common/CustomDriverConfigs/ChromiumEdgeDriver.cs create mode 100644 dotnet/test/common/CustomDriverConfigs/DefaultEdgeDriver.cs create mode 100644 dotnet/test/common/CustomDriverConfigs/SpecCompliantChromeDriver.cs diff --git a/dotnet/test/common/AlertsTest.cs b/dotnet/test/common/AlertsTest.cs index cfdbcaab365c5..06d9e64bc655b 100644 --- a/dotnet/test/common/AlertsTest.cs +++ b/dotnet/test/common/AlertsTest.cs @@ -66,8 +66,8 @@ public void ShouldAllowUsersToAcceptAnAlertWithNoTextManually() [Test] [IgnoreBrowser(Browser.Chrome, "This is the correct behavior, for the SwitchTo call to throw if it happens before the setTimeout call occurs in the browser and the alert is displayed.")] - [IgnoreBrowser(Browser.ChromiumEdge, "This is the correct behavior, for the SwitchTo call to throw if it happens before the setTimeout call occurs in the browser and the alert is displayed.")] [IgnoreBrowser(Browser.Edge, "This is the correct behavior, for the SwitchTo call to throw if it happens before the setTimeout call occurs in the browser and the alert is displayed.")] + [IgnoreBrowser(Browser.EdgeLegacy, "This is the correct behavior, for the SwitchTo call to throw if it happens before the setTimeout call occurs in the browser and the alert is displayed.")] [IgnoreBrowser(Browser.IE, "This is the correct behavior, for the SwitchTo call to throw if it happens before the setTimeout call occurs in the browser and the alert is displayed.")] [IgnoreBrowser(Browser.Firefox, "This is the correct behavior, for the SwitchTo call to throw if it happens before the setTimeout call occurs in the browser and the alert is displayed.")] [IgnoreBrowser(Browser.Safari, "This is the correct behavior, for the SwitchTo call to throw if it happens before the setTimeout call occurs in the browser and the alert is displayed.")] @@ -402,7 +402,7 @@ public void ShouldHandleAlertOnPageLoadUsingGet() [Test] [IgnoreBrowser(Browser.Chrome, "Test with onLoad alert hangs Chrome.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Test with onLoad alert hangs Edge.")] + [IgnoreBrowser(Browser.Edge, "Test with onLoad alert hangs Edge.")] [IgnoreBrowser(Browser.Safari, "Safari driver does not allow commands in any window when an alert is active")] public void ShouldNotHandleAlertInAnotherWindow() { @@ -449,8 +449,8 @@ public void ShouldNotHandleAlertInAnotherWindow() [Test] [IgnoreBrowser(Browser.Firefox, "After version 27, Firefox does not trigger alerts on unload.")] [IgnoreBrowser(Browser.Chrome, "Chrome does not trigger alerts on unload.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge does not trigger alerts on unload.")] [IgnoreBrowser(Browser.Edge, "Edge does not trigger alerts on unload.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge does not trigger alerts on unload.")] public void ShouldHandleAlertOnPageUnload() { string pageWithOnBeforeUnload = EnvironmentManager.Instance.UrlBuilder.CreateInlinePage(new InlinePage() @@ -474,9 +474,9 @@ public void ShouldHandleAlertOnPageUnload() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome does not implicitly handle onBeforeUnload alert")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge does not implicitly handle onBeforeUnload alert")] + [IgnoreBrowser(Browser.Edge, "Edge does not implicitly handle onBeforeUnload alert")] [IgnoreBrowser(Browser.Safari, "Safari driver does not implicitly (or otherwise) handle onBeforeUnload alerts")] - [IgnoreBrowser(Browser.Edge, "Edge driver does not implicitly (or otherwise) handle onBeforeUnload alerts")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver does not implicitly (or otherwise) handle onBeforeUnload alerts")] public void ShouldImplicitlyHandleAlertOnPageBeforeUnload() { string blank = EnvironmentManager.Instance.UrlBuilder.CreateInlinePage(new InlinePage().WithTitle("Success")); @@ -494,9 +494,9 @@ public void ShouldImplicitlyHandleAlertOnPageBeforeUnload() [Test] [IgnoreBrowser(Browser.IE, "Test as written does not trigger alert; also onbeforeunload alert on close will hang browser")] [IgnoreBrowser(Browser.Chrome, "Test as written does not trigger alert")] - [IgnoreBrowser(Browser.ChromiumEdge, "Test as written does not trigger alert")] + [IgnoreBrowser(Browser.Edge, "Test as written does not trigger alert")] [IgnoreBrowser(Browser.Firefox, "After version 27, Firefox does not trigger alerts on unload.")] - [IgnoreBrowser(Browser.Edge, "Edge does not trigger alerts on unload.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge does not trigger alerts on unload.")] public void ShouldHandleAlertOnWindowClose() { string pageWithOnBeforeUnload = EnvironmentManager.Instance.UrlBuilder.CreateInlinePage(new InlinePage() @@ -530,8 +530,8 @@ public void ShouldHandleAlertOnWindowClose() [Test] [IgnoreBrowser(Browser.Chrome, "Driver chooses not to return text from unhandled alert")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver chooses not to return text from unhandled alert")] [IgnoreBrowser(Browser.Edge, "Driver chooses not to return text from unhandled alert")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver chooses not to return text from unhandled alert")] [IgnoreBrowser(Browser.Firefox, "Driver chooses not to return text from unhandled alert")] [IgnoreBrowser(Browser.Opera)] [IgnoreBrowser(Browser.Safari, "Safari driver does not do unhandled alerts")] @@ -623,8 +623,8 @@ public void ShouldHandleAlertOnPageBeforeUnloadAlertAtQuit() // Disabling test for all browsers. Authentication API is not supported by any driver yet. // [Test] [IgnoreBrowser(Browser.Chrome)] - [IgnoreBrowser(Browser.ChromiumEdge)] [IgnoreBrowser(Browser.Edge)] + [IgnoreBrowser(Browser.EdgeLegacy)] [IgnoreBrowser(Browser.Firefox)] [IgnoreBrowser(Browser.IE)] [IgnoreBrowser(Browser.Opera)] @@ -642,8 +642,8 @@ public void ShouldBeAbleToHandleAuthenticationDialog() // Disabling test for all browsers. Authentication API is not supported by any driver yet. // [Test] [IgnoreBrowser(Browser.Chrome)] - [IgnoreBrowser(Browser.ChromiumEdge)] [IgnoreBrowser(Browser.Edge)] + [IgnoreBrowser(Browser.EdgeLegacy)] [IgnoreBrowser(Browser.Firefox)] [IgnoreBrowser(Browser.IE)] [IgnoreBrowser(Browser.Opera)] @@ -659,8 +659,8 @@ public void ShouldBeAbleToDismissAuthenticationDialog() // Disabling test for all browsers. Authentication API is not supported by any driver yet. // [Test] [IgnoreBrowser(Browser.Chrome)] - [IgnoreBrowser(Browser.ChromiumEdge)] [IgnoreBrowser(Browser.Edge)] + [IgnoreBrowser(Browser.EdgeLegacy)] [IgnoreBrowser(Browser.Firefox)] [IgnoreBrowser(Browser.Opera)] [IgnoreBrowser(Browser.Remote)] diff --git a/dotnet/test/common/AvailableLogsTest.cs b/dotnet/test/common/AvailableLogsTest.cs index b638122b80db8..990d8f0673ba0 100644 --- a/dotnet/test/common/AvailableLogsTest.cs +++ b/dotnet/test/common/AvailableLogsTest.cs @@ -7,7 +7,7 @@ namespace OpenQA.Selenium { [TestFixture] - [IgnoreBrowser(Browser.Edge, "Edge driver does not support logs API")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver does not support logs API")] [IgnoreBrowser(Browser.Firefox, "Firefox driver (when using Marionette/Geckodriver) does not support logs API")] [IgnoreBrowser(Browser.IE, "IE driver does not support logs API")] [IgnoreBrowser(Browser.Safari, "Edge driver does not support logs API")] @@ -69,7 +69,7 @@ public void ProfilerLogShouldBeDisabledByDefault() //[Test] [IgnoreBrowser(Browser.Chrome, "Chrome does not support profiler logs")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge does not support profiler logs")] + [IgnoreBrowser(Browser.Edge, "Edge does not support profiler logs")] public void ShouldBeAbleToEnableProfilerLog() { CreateWebDriverWithProfiling(); diff --git a/dotnet/test/common/Browser.cs b/dotnet/test/common/Browser.cs index 203abcc7d10f6..713e553ef3570 100644 --- a/dotnet/test/common/Browser.cs +++ b/dotnet/test/common/Browser.cs @@ -4,8 +4,8 @@ public enum Browser { All, IE, - ChromiumEdge, Edge, + EdgeLegacy, Firefox, Safari, Chrome, diff --git a/dotnet/test/common/ClearTest.cs b/dotnet/test/common/ClearTest.cs index 123a5d9abf8d2..fb702e02e9d18 100644 --- a/dotnet/test/common/ClearTest.cs +++ b/dotnet/test/common/ClearTest.cs @@ -117,7 +117,7 @@ public void ShouldBeAbleToClearUrlInput() } [Test] - [IgnoreBrowser(Browser.Edge, "Driver sees range input as not editable")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver sees range input as not editable")] public void ShouldBeAbleToClearRangeInput() { ShouldBeAbleToClearInput(By.Name("range_input"), "42", "50"); @@ -125,8 +125,8 @@ public void ShouldBeAbleToClearRangeInput() [Test] [IgnoreBrowser(Browser.Chrome, "Driver sees checkbox as not editable")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver sees checkbox as not editable")] [IgnoreBrowser(Browser.Edge, "Driver sees checkbox as not editable")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver sees checkbox as not editable")] [IgnoreBrowser(Browser.Firefox, "Driver sees checkbox as not editable")] [IgnoreBrowser(Browser.IE, "Driver sees checkbox as not editable")] [IgnoreBrowser(Browser.Safari, "Driver sees checkbox as not editable")] @@ -136,7 +136,7 @@ public void ShouldBeAbleToClearCheckboxInput() } [Test] - [IgnoreBrowser(Browser.Edge, "Driver sees color input as not editable")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver sees color input as not editable")] [IgnoreBrowser(Browser.IE, "Driver does not support clearing color elements")] public void ShouldBeAbleToClearColorInput() { diff --git a/dotnet/test/common/ClickScrollingTest.cs b/dotnet/test/common/ClickScrollingTest.cs index eeb195d277911..95f3d53dd3583 100644 --- a/dotnet/test/common/ClickScrollingTest.cs +++ b/dotnet/test/common/ClickScrollingTest.cs @@ -95,7 +95,7 @@ public void ShouldNotScrollOverflowElementsWhichAreVisible() [Test] [IgnoreBrowser(Browser.Chrome, "Webkit-based browsers apparently scroll anyway.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Webkit-based browsers apparently scroll anyway.")] + [IgnoreBrowser(Browser.Edge, "Webkit-based browsers apparently scroll anyway.")] public void ShouldNotScrollIfAlreadyScrolledAndElementIsInView() { driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("scroll3.html"); diff --git a/dotnet/test/common/ClickTest.cs b/dotnet/test/common/ClickTest.cs index 89e1e4c43f67e..f998919dd06ed 100644 --- a/dotnet/test/common/ClickTest.cs +++ b/dotnet/test/common/ClickTest.cs @@ -340,8 +340,8 @@ public void ShouldBeAbleToClickOnASpanThatWrapsToTheNextLine() [Test] [IgnoreBrowser(Browser.IE, "Element is properly seen as obscured.")] [IgnoreBrowser(Browser.Chrome, "Element is properly seen as obscured.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Element is properly seen as obscured.")] [IgnoreBrowser(Browser.Edge, "Element is properly seen as obscured.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Element is properly seen as obscured.")] [IgnoreBrowser(Browser.Firefox, "Element is properly seen as obscured.")] [IgnoreBrowser(Browser.Safari, "Element is properly seen as obscured.")] public void ShouldBeAbleToClickOnAPartiallyOverlappedLinkThatWrapsToTheNextLine() diff --git a/dotnet/test/common/ContentEditableTest.cs b/dotnet/test/common/ContentEditableTest.cs index 135681cbe6c65..132c3699919cf 100644 --- a/dotnet/test/common/ContentEditableTest.cs +++ b/dotnet/test/common/ContentEditableTest.cs @@ -64,7 +64,7 @@ public void ShouldBeAbleToTypeIntoEmptyContentEditableElement() [Test] [IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable areas")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver prepends text in contentEditable areas")] + [IgnoreBrowser(Browser.Edge, "Driver prepends text in contentEditable areas")] [IgnoreBrowser(Browser.Firefox, "Driver prepends text in contentEditable areas")] [IgnoreBrowser(Browser.Safari, "Driver prepends text to contentEditable areas")] public void ShouldBeAbleToTypeIntoContentEditableElementWithExistingValue() @@ -94,7 +94,7 @@ public void ShouldBeAbleToTypeIntoTinyMCE() [Test] [IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable areas")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver prepends text in contentEditable areas")] + [IgnoreBrowser(Browser.Edge, "Driver prepends text in contentEditable areas")] [IgnoreBrowser(Browser.Firefox, "Driver prepends text in contentEditable areas")] [IgnoreBrowser(Browser.IE, "Prepends text")] [IgnoreBrowser(Browser.Safari, "Driver prepends text to contentEditable areas")] @@ -113,7 +113,7 @@ public void ShouldAppendToTinyMCE() [Test] [IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable areas")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver prepends text in contentEditable areas")] + [IgnoreBrowser(Browser.Edge, "Driver prepends text in contentEditable areas")] [IgnoreBrowser(Browser.Firefox, "Browser does not automatically focus body element in frame")] [IgnoreBrowser(Browser.Safari, "Driver prepends text to contentEditable areas")] public void AppendsTextToEndOfContentEditableWithMultipleTextNodes() diff --git a/dotnet/test/common/CookieImplementationTest.cs b/dotnet/test/common/CookieImplementationTest.cs index 64bcbdad7d808..96dbe91567afb 100644 --- a/dotnet/test/common/CookieImplementationTest.cs +++ b/dotnet/test/common/CookieImplementationTest.cs @@ -181,7 +181,7 @@ public void AddCookiesWithDifferentPathsThatAreRelatedToOurs() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome does not retrieve cookies when in frame.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge does not retrieve cookies when in frame.")] + [IgnoreBrowser(Browser.Edge, "Edge does not retrieve cookies when in frame.")] public void GetCookiesInAFrame() { driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("animals"); @@ -469,7 +469,7 @@ public void ShouldRetainCookieExpiry() [Test] [IgnoreBrowser(Browser.IE, "Browser does not handle untrusted SSL certificates.")] - [IgnoreBrowser(Browser.Edge, "Browser does not handle untrusted SSL certificates.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Browser does not handle untrusted SSL certificates.")] public void CanHandleSecureCookie() { driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("animals"); @@ -485,7 +485,7 @@ public void CanHandleSecureCookie() [Test] [IgnoreBrowser(Browser.IE, "Browser does not handle untrusted SSL certificates.")] - [IgnoreBrowser(Browser.Edge, "Browser does not handle untrusted SSL certificates.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Browser does not handle untrusted SSL certificates.")] public void ShouldRetainCookieSecure() { driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("animals"); diff --git a/dotnet/test/common/CorrectEventFiringTest.cs b/dotnet/test/common/CorrectEventFiringTest.cs index d4f8fd2514219..c6ba5911a2f4e 100644 --- a/dotnet/test/common/CorrectEventFiringTest.cs +++ b/dotnet/test/common/CorrectEventFiringTest.cs @@ -23,7 +23,7 @@ public void ShouldFireFocusEventWhenClicking() [Test] [NeedsFreshDriver(IsCreatedBeforeTest = true, IsCreatedAfterTest = true)] - [IgnoreBrowser(Browser.Edge, "Edge driver does not support multiple instances")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver does not support multiple instances")] [IgnoreBrowser(Browser.Safari, "Safari driver does not support multiple instances")] public void ShouldFireFocusEventInNonTopmostWindow() { @@ -265,7 +265,7 @@ public void SendingKeysToAnotherElementShouldCauseTheBlurEventToFire() } [Test] - [IgnoreBrowser(Browser.Edge, "Edge driver does not support multiple instances")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver does not support multiple instances")] [IgnoreBrowser(Browser.Safari, "Safari driver does not support multiple instances")] public void SendingKeysToAnotherElementShouldCauseTheBlurEventToFireInNonTopmostWindow() { @@ -462,8 +462,8 @@ public void ClickOverlappingElements() [Test] [IgnoreBrowser(Browser.Chrome, "Driver checks for overlapping elements")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.Edge, "Driver checks for overlapping elements")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.Firefox, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.IE, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.Safari, "Driver checks for overlapping elements")] @@ -495,8 +495,8 @@ public void ClickPartiallyOverlappingElements() [Test] [IgnoreBrowser(Browser.Chrome, "Driver checks for overlapping elements")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.Edge, "Driver checks for overlapping elements")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.Firefox, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.IE, "Driver checks for overlapping elements")] [IgnoreBrowser(Browser.Safari, "Driver checks for overlapping elements")] diff --git a/dotnet/test/common/CustomDriverConfigs/ChromiumEdgeDriver.cs b/dotnet/test/common/CustomDriverConfigs/ChromiumEdgeDriver.cs new file mode 100644 index 0000000000000..870221d00a37c --- /dev/null +++ b/dotnet/test/common/CustomDriverConfigs/ChromiumEdgeDriver.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.Edge +{ + public class ChromiumEdgeDriver : EdgeDriver + { + public ChromiumEdgeDriver() + : this(DefaultService, DefaultOptions) + { + } + + public ChromiumEdgeDriver(EdgeDriverService service, EdgeOptions options) + : base(service, options) + { + } + + public static EdgeOptions DefaultOptions + { + get { return new EdgeOptions(false) { UseSpecCompliantProtocol = true }; } + } + + public static EdgeDriverService DefaultService + { + get + { + EdgeDriverService service = EdgeDriverService.CreateDefaultService(false); + return service; + } + } + } +} diff --git a/dotnet/test/common/CustomDriverConfigs/DefaultEdgeDriver.cs b/dotnet/test/common/CustomDriverConfigs/DefaultEdgeDriver.cs new file mode 100644 index 0000000000000..f31b813d954a1 --- /dev/null +++ b/dotnet/test/common/CustomDriverConfigs/DefaultEdgeDriver.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.Edge +{ + public class DefaultEdgeDriver : EdgeDriver + { + public DefaultEdgeDriver() + : this(DefaultService, new EdgeOptions()) + { + } + + public DefaultEdgeDriver(EdgeDriverService service, EdgeOptions options) + : base(service, options) + { + } + + public static EdgeDriverService DefaultService + { + get + { + EdgeDriverService service = EdgeDriverService.CreateDefaultService(); + service.UseSpecCompliantProtocol = true; + return service; + } + } + } +} diff --git a/dotnet/test/common/CustomDriverConfigs/SpecCompliantChromeDriver.cs b/dotnet/test/common/CustomDriverConfigs/SpecCompliantChromeDriver.cs new file mode 100644 index 0000000000000..0c2bdf4ea2df5 --- /dev/null +++ b/dotnet/test/common/CustomDriverConfigs/SpecCompliantChromeDriver.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.Chrome +{ + public class SpecCompliantChromeDriver : ChromeDriver + { + public SpecCompliantChromeDriver(ChromeDriverService service) + : this(service, DefaultOptions) + { + } + + public SpecCompliantChromeDriver(ChromeDriverService service, ChromeOptions options) + : base(service, options) + { + } + + public static ChromeOptions DefaultOptions + { + get { return new ChromeOptions() { UseSpecCompliantProtocol = true }; } + } + } +} diff --git a/dotnet/test/common/CustomTestAttributes/IgnoreBrowserAttribute.cs b/dotnet/test/common/CustomTestAttributes/IgnoreBrowserAttribute.cs index e6cd046a41b42..d8bde5d5d1d3c 100644 --- a/dotnet/test/common/CustomTestAttributes/IgnoreBrowserAttribute.cs +++ b/dotnet/test/common/CustomTestAttributes/IgnoreBrowserAttribute.cs @@ -104,7 +104,7 @@ private bool IsRemoteInstanceOfBrowser(Browser desiredBrowser) isRemoteInstance = true; } break; - case Browser.ChromiumEdge: + case Browser.Edge: if (EnvironmentManager.Instance.RemoteCapabilities == "MicrosoftEdge") { isRemoteInstance = true; diff --git a/dotnet/test/common/ElementFindingTest.cs b/dotnet/test/common/ElementFindingTest.cs index 9147413fe6614..c5f2d4ed8e313 100644 --- a/dotnet/test/common/ElementFindingTest.cs +++ b/dotnet/test/common/ElementFindingTest.cs @@ -357,10 +357,10 @@ public void FindingASingleElementByInvalidClassNameShouldThrow() [Test] [IgnoreBrowser(Browser.IE, "Class name is perfectly legal when using CSS selector, if properly escaped.")] [IgnoreBrowser(Browser.Firefox, "Class name is perfectly legal when using CSS selector, if properly escaped.")] - [IgnoreBrowser(Browser.Edge, "Class name is perfectly legal when using CSS selector, if properly escaped.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Class name is perfectly legal when using CSS selector, if properly escaped.")] [IgnoreBrowser(Browser.Safari, "Class name is perfectly legal when using CSS selector, if properly escaped.")] [IgnoreBrowser(Browser.Chrome, "Class name is perfectly legal when using CSS selector, if properly escaped.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Class name is perfectly legal when using CSS selector, if properly escaped.")] + [IgnoreBrowser(Browser.Edge, "Class name is perfectly legal when using CSS selector, if properly escaped.")] [IgnoreBrowser(Browser.Opera, "Throws WebDriverException")] public void FindingMultipleElementsByInvalidClassNameShouldThrow() { @@ -434,7 +434,7 @@ public void FindingALinkByXpathUsingContainsKeywordShouldWork() [Test] [IgnoreBrowser(Browser.IE, "Driver does not support XML namespaces in XPath")] [IgnoreBrowser(Browser.Firefox, "Driver does not support XML namespaces in XPath")] - [IgnoreBrowser(Browser.Edge, "Driver does not support XML namespaces in XPath")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver does not support XML namespaces in XPath")] [IgnoreBrowser(Browser.Safari, "Not yet implemented")] public void ShouldBeAbleToFindElementByXPathWithNamespace() { @@ -446,8 +446,8 @@ public void ShouldBeAbleToFindElementByXPathWithNamespace() [Test] [IgnoreBrowser(Browser.IE, "Driver does not support finding elements on XML documents.")] [IgnoreBrowser(Browser.Chrome, "Driver does not support finding elements on XML documents.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver does not support finding elements on XML documents.")] [IgnoreBrowser(Browser.Edge, "Driver does not support finding elements on XML documents.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver does not support finding elements on XML documents.")] [IgnoreBrowser(Browser.Safari, "Not yet implemented")] public void ShouldBeAbleToFindElementByXPathInXmlDocument() { diff --git a/dotnet/test/common/Environment/DriverFactory.cs b/dotnet/test/common/Environment/DriverFactory.cs index 70ed0a91c00cd..00962eb4be362 100644 --- a/dotnet/test/common/Environment/DriverFactory.cs +++ b/dotnet/test/common/Environment/DriverFactory.cs @@ -38,8 +38,8 @@ public DriverFactory(string driverPath) private void PopulateOptionsTypes() { this.optionsTypes[Browser.Chrome] = typeof(ChromeOptions); + this.optionsTypes[Browser.EdgeLegacy] = typeof(EdgeOptions); this.optionsTypes[Browser.Edge] = typeof(EdgeOptions); - this.optionsTypes[Browser.ChromiumEdge] = typeof(EdgeOptions); this.optionsTypes[Browser.Firefox] = typeof(FirefoxOptions); this.optionsTypes[Browser.IE] = typeof(InternetExplorerOptions); this.optionsTypes[Browser.Opera] = typeof(OperaOptions); @@ -49,8 +49,8 @@ private void PopulateOptionsTypes() private void PopulateServiceTypes() { this.serviceTypes[Browser.Chrome] = typeof(ChromeDriverService); + this.serviceTypes[Browser.EdgeLegacy] = typeof(EdgeDriverService); this.serviceTypes[Browser.Edge] = typeof(EdgeDriverService); - this.serviceTypes[Browser.ChromiumEdge] = typeof(EdgeDriverService); this.serviceTypes[Browser.Firefox] = typeof(FirefoxDriverService); this.serviceTypes[Browser.IE] = typeof(InternetExplorerDriverService); this.serviceTypes[Browser.Opera] = typeof(OperaDriverService); @@ -91,7 +91,7 @@ public IWebDriver CreateDriverWithOptions(Type driverType, DriverOptions driverO } else if (typeof(EdgeDriver).IsAssignableFrom(driverType)) { - browser = Browser.Edge; + browser = Browser.EdgeLegacy; options = GetDriverOptions(driverType, driverOptions); service = CreateService(driverType); } diff --git a/dotnet/test/common/ExecutingAsyncJavascriptTest.cs b/dotnet/test/common/ExecutingAsyncJavascriptTest.cs index 5aa4520813bc2..3dc955f8068ae 100644 --- a/dotnet/test/common/ExecutingAsyncJavascriptTest.cs +++ b/dotnet/test/common/ExecutingAsyncJavascriptTest.cs @@ -194,10 +194,10 @@ public void ShouldNotTimeoutWithMultipleCallsTheFirstOneBeingSynchronous() [Test] [IgnoreBrowser(Browser.Chrome, ".NET language bindings do not properly parse JavaScript stack trace")] - [IgnoreBrowser(Browser.ChromiumEdge, ".NET language bindings do not properly parse JavaScript stack trace")] + [IgnoreBrowser(Browser.Edge, ".NET language bindings do not properly parse JavaScript stack trace")] [IgnoreBrowser(Browser.Firefox, ".NET language bindings do not properly parse JavaScript stack trace")] [IgnoreBrowser(Browser.IE, ".NET language bindings do not properly parse JavaScript stack trace")] - [IgnoreBrowser(Browser.Edge, ".NET language bindings do not properly parse JavaScript stack trace")] + [IgnoreBrowser(Browser.EdgeLegacy, ".NET language bindings do not properly parse JavaScript stack trace")] [IgnoreBrowser(Browser.Safari, ".NET language bindings do not properly parse JavaScript stack trace")] public void ShouldCatchErrorsWithMessageAndStacktraceWhenExecutingInitialScript() { @@ -340,8 +340,8 @@ public void ThrowsIfAlertHappensDuringScriptWhichTimesOut() [Test] [IgnoreBrowser(Browser.Chrome, "Driver chooses not to return text from unhandled alert")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver chooses not to return text from unhandled alert")] [IgnoreBrowser(Browser.Edge, "Driver chooses not to return text from unhandled alert")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver chooses not to return text from unhandled alert")] [IgnoreBrowser(Browser.Firefox, "Driver chooses not to return text from unhandled alert")] [IgnoreBrowser(Browser.Safari, "Does not alerts thrown during async JavaScript; driver hangs until alert dismissed")] [IgnoreBrowser(Browser.Opera, "Does not handle async alerts")] diff --git a/dotnet/test/common/ExecutingJavascriptTest.cs b/dotnet/test/common/ExecutingJavascriptTest.cs index e03de1f83b12d..00e87399d8d1d 100644 --- a/dotnet/test/common/ExecutingJavascriptTest.cs +++ b/dotnet/test/common/ExecutingJavascriptTest.cs @@ -226,10 +226,10 @@ public void ShouldThrowAnExceptionWhenTheJavascriptIsBad() [Test] [IgnoreBrowser(Browser.Chrome, ".NET language bindings do not properly parse JavaScript stack trace")] - [IgnoreBrowser(Browser.ChromiumEdge, ".NET language bindings do not properly parse JavaScript stack trace")] + [IgnoreBrowser(Browser.Edge, ".NET language bindings do not properly parse JavaScript stack trace")] [IgnoreBrowser(Browser.Firefox, ".NET language bindings do not properly parse JavaScript stack trace")] [IgnoreBrowser(Browser.IE, ".NET language bindings do not properly parse JavaScript stack trace")] - [IgnoreBrowser(Browser.Edge, ".NET language bindings do not properly parse JavaScript stack trace")] + [IgnoreBrowser(Browser.EdgeLegacy, ".NET language bindings do not properly parse JavaScript stack trace")] [IgnoreBrowser(Browser.Safari, ".NET language bindings do not properly parse JavaScript stack trace")] public void ShouldThrowAnExceptionWithMessageAndStacktraceWhenTheJavascriptIsBad() { @@ -527,7 +527,7 @@ public void ShouldThrowAnExceptionWhenArgumentsWithStaleElementPassed() [Test] [IgnoreBrowser(Browser.Chrome, "Browser does not return Date object.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Browser does not return Date object.")] + [IgnoreBrowser(Browser.Edge, "Browser does not return Date object.")] public void ShouldBeAbleToReturnADateObject() { driver.Url = simpleTestPage; @@ -538,11 +538,11 @@ public void ShouldBeAbleToReturnADateObject() [Test] [IgnoreBrowser(Browser.Chrome, "Driver returns object that allows getting text.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver returns object that allows getting text.")] + [IgnoreBrowser(Browser.Edge, "Driver returns object that allows getting text.")] [IgnoreBrowser(Browser.Firefox, "Driver does not return the documentElement object.")] [IgnoreBrowser(Browser.IE, "Driver does not return the documentElement object.")] [IgnoreBrowser(Browser.Safari, "Driver does not return the documentElement object.")] - [IgnoreBrowser(Browser.Edge, "Driver does not return the documentElement object.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver does not return the documentElement object.")] public void ShouldReturnDocumentElementIfDocumentIsReturned() { driver.Url = simpleTestPage; diff --git a/dotnet/test/common/FrameSwitchingTest.cs b/dotnet/test/common/FrameSwitchingTest.cs index 0da721ab18e57..3571b0ac0514b 100644 --- a/dotnet/test/common/FrameSwitchingTest.cs +++ b/dotnet/test/common/FrameSwitchingTest.cs @@ -448,7 +448,7 @@ public void ShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUsWithWebele [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver throws NoSuchElementException, spec is unclear")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver throws NoSuchElementException, spec is unclear")] + [IgnoreBrowser(Browser.Edge, "Edge driver throws NoSuchElementException, spec is unclear")] [IgnoreBrowser(Browser.Firefox, "Marionette throws 'Cannot access dead object' in subsequent tests when frame is deleted")] [IgnoreBrowser(Browser.IE, "IE driver throws NoSuchElementException, spec is unclear")] public void ShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs() diff --git a/dotnet/test/common/GetLogsTest.cs b/dotnet/test/common/GetLogsTest.cs index 68ca76a1d6a49..469f18a356f6e 100644 --- a/dotnet/test/common/GetLogsTest.cs +++ b/dotnet/test/common/GetLogsTest.cs @@ -9,7 +9,7 @@ namespace OpenQA.Selenium { [TestFixture] - [IgnoreBrowser(Browser.Edge, "Edge driver does not support logs API")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver does not support logs API")] [IgnoreBrowser(Browser.Firefox, "Firefox driver (when using Marionette/Geckodriver) does not support logs API")] [IgnoreBrowser(Browser.IE, "IE driver does not support logs API")] [IgnoreBrowser(Browser.Safari, "Edge driver does not support logs API")] diff --git a/dotnet/test/common/HTML5/LocationContextTest.cs b/dotnet/test/common/HTML5/LocationContextTest.cs index b846d628bae6a..b78a1d51d4bb2 100644 --- a/dotnet/test/common/HTML5/LocationContextTest.cs +++ b/dotnet/test/common/HTML5/LocationContextTest.cs @@ -6,10 +6,10 @@ namespace OpenQA.Selenium.Html5 public class LocationContextTest : DriverTestFixture { //[Test] - [IgnoreBrowser(Browser.Edge, "Driver incorrectly reports location capability")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver incorrectly reports location capability")] [IgnoreBrowser(Browser.Firefox, "Firefox driver incorrectly reports capability of geolocation.")] [IgnoreBrowser(Browser.Chrome, "Chrome driver does not support setting altitude value.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver does not support setting altitude value.")] + [IgnoreBrowser(Browser.Edge, "Edge driver does not support setting altitude value.")] public void ShouldSetAndGetLocation() { driver.Url = html5Page; diff --git a/dotnet/test/common/I18Test.cs b/dotnet/test/common/I18Test.cs index 5c5d88531e378..adaecf98e9fa8 100644 --- a/dotnet/test/common/I18Test.cs +++ b/dotnet/test/common/I18Test.cs @@ -46,7 +46,7 @@ public void ShouldBeAbleToEnterHebrewTextFromRightToLeft() [Test] [IgnoreBrowser(Browser.Chrome, "ChromeDriver only supports characters in the BMP")] - [IgnoreBrowser(Browser.ChromiumEdge, "EdgeDriver only supports characters in the BMP")] + [IgnoreBrowser(Browser.Edge, "EdgeDriver only supports characters in the BMP")] public void ShouldBeAbleToEnterSupplementaryCharacters() { if (TestUtilities.IsOldIE(driver)) diff --git a/dotnet/test/common/Interactions/BasicMouseInterfaceTest.cs b/dotnet/test/common/Interactions/BasicMouseInterfaceTest.cs index 01b163ae0dbb5..06eaac615d7a2 100644 --- a/dotnet/test/common/Interactions/BasicMouseInterfaceTest.cs +++ b/dotnet/test/common/Interactions/BasicMouseInterfaceTest.cs @@ -144,8 +144,8 @@ public void ShouldNotMoveToANullLocator() [Test] [IgnoreBrowser(Browser.Chrome, "Drivers correctly click at current mouse position without another move, preserving mouse position.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Drivers correctly click at current mouse position without another move, preserving mouse position.")] [IgnoreBrowser(Browser.Edge, "Drivers correctly click at current mouse position without another move, preserving mouse position.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Drivers correctly click at current mouse position without another move, preserving mouse position.")] [IgnoreBrowser(Browser.Firefox, "Drivers correctly click at current mouse position without another move, preserving mouse position.")] [IgnoreBrowser(Browser.IE, "Drivers correctly click at current mouse position without another move, preserving mouse position.")] [IgnoreBrowser(Browser.Safari, "Drivers correctly click at current mouse position without another move, preserving mouse position.")] @@ -181,8 +181,8 @@ public void MovingIntoAnImageEnclosedInALink() [Test] [IgnoreBrowser(Browser.Chrome, "Moving outside of view port throws exception in spec-compliant driver")] - [IgnoreBrowser(Browser.ChromiumEdge, "Moving outside of view port throws exception in spec-compliant driver")] [IgnoreBrowser(Browser.Edge, "Moving outside of view port throws exception in spec-compliant driver")] + [IgnoreBrowser(Browser.EdgeLegacy, "Moving outside of view port throws exception in spec-compliant driver")] [IgnoreBrowser(Browser.Firefox, "Moving outside of view port throws exception in spec-compliant driver")] [IgnoreBrowser(Browser.IE, "Moving outside of view port throws exception in spec-compliant driver")] [IgnoreBrowser(Browser.Safari, "Moving outside of view port throws exception in spec-compliant driver")] diff --git a/dotnet/test/common/MiscTest.cs b/dotnet/test/common/MiscTest.cs index 42f280cb6a149..7a11c926c1d6e 100644 --- a/dotnet/test/common/MiscTest.cs +++ b/dotnet/test/common/MiscTest.cs @@ -55,10 +55,10 @@ public void ShouldReturnTheSourceOfAPage() [Test] [IgnoreBrowser(Browser.Chrome, "returns XML content formatted for display as HTML document")] - [IgnoreBrowser(Browser.ChromiumEdge, "returns XML content formatted for display as HTML document")] + [IgnoreBrowser(Browser.Edge, "returns XML content formatted for display as HTML document")] [IgnoreBrowser(Browser.Safari, "returns XML content formatted for display as HTML document")] [IgnoreBrowser(Browser.IE, "returns XML content formatted for display as HTML document")] - [IgnoreBrowser(Browser.Edge, "returns XML content formatted for display as HTML document")] + [IgnoreBrowser(Browser.EdgeLegacy, "returns XML content formatted for display as HTML document")] [IgnoreBrowser(Browser.Opera)] public void ShouldBeAbleToGetTheSourceOfAnXmlDocument() { diff --git a/dotnet/test/common/PageLoadingTest.cs b/dotnet/test/common/PageLoadingTest.cs index d45392762d704..84a4207209753 100644 --- a/dotnet/test/common/PageLoadingTest.cs +++ b/dotnet/test/common/PageLoadingTest.cs @@ -65,7 +65,7 @@ public void NoneStrategyShouldNotWaitForPageToRefresh() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver does not support eager page load strategy")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver does not support eager page load strategy")] + [IgnoreBrowser(Browser.Edge, "Edge driver does not support eager page load strategy")] public void EagerStrategyShouldNotWaitForResources() { InitLocalDriver(PageLoadStrategy.Eager); @@ -87,7 +87,7 @@ public void EagerStrategyShouldNotWaitForResources() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver does not support eager page load strategy")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver does not support eager page load strategy")] + [IgnoreBrowser(Browser.Edge, "Edge driver does not support eager page load strategy")] public void EagerStrategyShouldNotWaitForResourcesOnRefresh() { InitLocalDriver(PageLoadStrategy.Eager); @@ -114,7 +114,7 @@ public void EagerStrategyShouldNotWaitForResourcesOnRefresh() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver does not support eager page load strategy")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver does not support eager page load strategy")] + [IgnoreBrowser(Browser.Edge, "Edge driver does not support eager page load strategy")] public void EagerStrategyShouldWaitForDocumentToBeLoaded() { InitLocalDriver(PageLoadStrategy.Eager); @@ -288,7 +288,7 @@ public void ShouldBeAbleToNavigateForwardsInTheBrowserHistory() [Test] [IgnoreBrowser(Browser.IE, "Browser does not support using insecure SSL certs")] [IgnoreBrowser(Browser.Safari, "Browser does not support using insecure SSL certs")] - [IgnoreBrowser(Browser.Edge, "Browser does not support using insecure SSL certs")] + [IgnoreBrowser(Browser.EdgeLegacy, "Browser does not support using insecure SSL certs")] public void ShouldBeAbleToAccessPagesWithAnInsecureSslCertificate() { String url = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("simpleTest.html"); @@ -365,7 +365,7 @@ public void ShouldTimeoutIfAPageTakesTooLongToLoad() [Test] [IgnoreBrowser(Browser.Opera, "Not implemented for browser")] - [IgnoreBrowser(Browser.Edge, "Not implemented for browser")] + [IgnoreBrowser(Browser.EdgeLegacy, "Not implemented for browser")] [NeedsFreshDriver(IsCreatedAfterTest = true)] public void ShouldTimeoutIfAPageTakesTooLongToLoadAfterClick() { @@ -416,9 +416,9 @@ public void ShouldTimeoutIfAPageTakesTooLongToRefresh() } [Test] - [IgnoreBrowser(Browser.Edge, "Test hangs browser.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Test hangs browser.")] [IgnoreBrowser(Browser.Chrome, "Chrome driver does, in fact, stop loading page after a timeout.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver does, in fact, stop loading page after a timeout.")] + [IgnoreBrowser(Browser.Edge, "Edge driver does, in fact, stop loading page after a timeout.")] [IgnoreBrowser(Browser.Opera, "Not implemented for browser")] [IgnoreBrowser(Browser.Safari, "Safari behaves correctly with page load timeout, but getting text does not propertly trim, leading to a test run time of over 30 seconds")] [NeedsFreshDriver(IsCreatedAfterTest = true)] diff --git a/dotnet/test/common/ProxySettingTest.cs b/dotnet/test/common/ProxySettingTest.cs index 51f0a535a8041..aed9f89eabd08 100644 --- a/dotnet/test/common/ProxySettingTest.cs +++ b/dotnet/test/common/ProxySettingTest.cs @@ -47,7 +47,7 @@ public void QuitAdditionalDriver() [Test] [IgnoreBrowser(Browser.Safari, "SafariDriver does not support setting proxy")] - [IgnoreBrowser(Browser.Edge, "EdgeDriver does not support setting proxy")] + [IgnoreBrowser(Browser.EdgeLegacy, "EdgeDriver does not support setting proxy")] public void CanConfigureManualHttpProxy() { proxyServer.EnableLogResourcesOnResponse(); @@ -60,7 +60,7 @@ public void CanConfigureManualHttpProxy() [Test] [IgnoreBrowser(Browser.Safari, "SafariDriver does not support setting proxy")] - [IgnoreBrowser(Browser.Edge, "EdgeDriver does not support setting proxy")] + [IgnoreBrowser(Browser.EdgeLegacy, "EdgeDriver does not support setting proxy")] public void CanConfigureNoProxy() { proxyServer.EnableLogResourcesOnResponse(); @@ -83,7 +83,7 @@ public void CanConfigureNoProxy() [Test] [IgnoreBrowser(Browser.Safari, "SafariDriver does not support setting proxy")] - [IgnoreBrowser(Browser.Edge, "EdgeDriver does not support setting proxy")] + [IgnoreBrowser(Browser.EdgeLegacy, "EdgeDriver does not support setting proxy")] public void CanConfigureProxyThroughAutoConfigFile() { StringBuilder pacFileContentBuilder = new StringBuilder(); @@ -105,7 +105,7 @@ public void CanConfigureProxyThroughAutoConfigFile() [Test] [IgnoreBrowser(Browser.Safari, "SafariDriver does not support setting proxy")] - [IgnoreBrowser(Browser.Edge, "EdgeDriver does not support setting proxy")] + [IgnoreBrowser(Browser.EdgeLegacy, "EdgeDriver does not support setting proxy")] public void CanUseAutoConfigFileThatOnlyProxiesCertainHosts() { StringBuilder pacFileContentBuilder = new StringBuilder(); diff --git a/dotnet/test/common/SvgDocumentTest.cs b/dotnet/test/common/SvgDocumentTest.cs index c1bee8ac30fcf..9751c129c64f5 100644 --- a/dotnet/test/common/SvgDocumentTest.cs +++ b/dotnet/test/common/SvgDocumentTest.cs @@ -8,7 +8,7 @@ public class SvgDocumentTest : DriverTestFixture [Test] [IgnoreBrowser(Browser.Opera, "Not tested")] [IgnoreBrowser(Browser.Chrome, "Chrome driver does not support clicking on SVG element yet")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver does not support clicking on SVG element yet")] + [IgnoreBrowser(Browser.Edge, "Edge driver does not support clicking on SVG element yet")] public void ClickOnSvgElement() { if (TestUtilities.IsOldIE(driver)) diff --git a/dotnet/test/common/TakesScreenshotTest.cs b/dotnet/test/common/TakesScreenshotTest.cs index 05e592df95560..94ddb297604e9 100644 --- a/dotnet/test/common/TakesScreenshotTest.cs +++ b/dotnet/test/common/TakesScreenshotTest.cs @@ -113,10 +113,10 @@ public void ShouldTakeScreenshotsOfAnElement() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver only captures visible viewport.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] [IgnoreBrowser(Browser.Firefox, "Firfox driver only captures visible viewport.")] [IgnoreBrowser(Browser.IE, "IE driver only captures visible viewport.")] - [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver only captures visible viewport.")] public void ShouldCaptureScreenshotOfPageWithLongX() { ITakesScreenshot screenshotCapableDriver = driver as ITakesScreenshot; @@ -143,10 +143,10 @@ public void ShouldCaptureScreenshotOfPageWithLongX() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver only captures visible viewport.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] [IgnoreBrowser(Browser.Firefox, "Firfox driver only captures visible viewport.")] [IgnoreBrowser(Browser.IE, "IE driver only captures visible viewport.")] - [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver only captures visible viewport.")] public void ShouldCaptureScreenshotOfPageWithLongY() { ITakesScreenshot screenshotCapableDriver = driver as ITakesScreenshot; @@ -172,10 +172,10 @@ public void ShouldCaptureScreenshotOfPageWithLongY() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver only captures visible viewport.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] [IgnoreBrowser(Browser.Firefox, "Firfox driver only captures visible viewport.")] [IgnoreBrowser(Browser.IE, "IE driver only captures visible viewport.")] - [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver only captures visible viewport.")] public void ShouldCaptureScreenshotOfPageWithTooLongX() { ITakesScreenshot screenshotCapableDriver = driver as ITakesScreenshot; @@ -201,10 +201,10 @@ public void ShouldCaptureScreenshotOfPageWithTooLongX() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver only captures visible viewport.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] [IgnoreBrowser(Browser.Firefox, "Firfox driver only captures visible viewport.")] [IgnoreBrowser(Browser.IE, "IE driver only captures visible viewport.")] - [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver only captures visible viewport.")] public void ShouldCaptureScreenshotOfPageWithTooLongY() { ITakesScreenshot screenshotCapableDriver = driver as ITakesScreenshot; @@ -230,10 +230,10 @@ public void ShouldCaptureScreenshotOfPageWithTooLongY() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver only captures visible viewport.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] [IgnoreBrowser(Browser.Firefox, "Firfox driver only captures visible viewport.")] [IgnoreBrowser(Browser.IE, "IE driver only captures visible viewport.")] - [IgnoreBrowser(Browser.Edge, "Edge driver only captures visible viewport.")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver only captures visible viewport.")] public void ShouldCaptureScreenshotOfPageWithTooLongXandY() { ITakesScreenshot screenshotCapableDriver = driver as ITakesScreenshot; diff --git a/dotnet/test/common/TextPagesTest.cs b/dotnet/test/common/TextPagesTest.cs index 4be979ba6ce88..cacb66151d268 100644 --- a/dotnet/test/common/TextPagesTest.cs +++ b/dotnet/test/common/TextPagesTest.cs @@ -19,9 +19,9 @@ public void ShouldBeAbleToLoadASimplePageOfText() [Test] [IgnoreBrowser(Browser.IE, "IE allows addition of cookie on text pages")] [IgnoreBrowser(Browser.Chrome, "Chrome allows addition of cookie on text pages")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge allows addition of cookie on text pages")] - [IgnoreBrowser(Browser.Firefox, "Firefox allows addition of cookie on text pages")] [IgnoreBrowser(Browser.Edge, "Edge allows addition of cookie on text pages")] + [IgnoreBrowser(Browser.Firefox, "Firefox allows addition of cookie on text pages")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge allows addition of cookie on text pages")] [IgnoreBrowser(Browser.Safari, "Safari allows addition of cookie on text pages")] [IgnoreBrowser(Browser.Opera, "Opera allows addition of cookie on text pages")] public void ShouldThrowExceptionWhenAddingCookieToAPageThatIsNotHtml() diff --git a/dotnet/test/common/TypingTest.cs b/dotnet/test/common/TypingTest.cs index 53bab87465968..a2e6b1eeaec33 100644 --- a/dotnet/test/common/TypingTest.cs +++ b/dotnet/test/common/TypingTest.cs @@ -715,7 +715,7 @@ public void ShouldBeAbleToTypeIntoEmptyContentEditableElement() [Test] [IgnoreBrowser(Browser.Chrome, "Driver prepends text in contentEditable")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver prepends text in contentEditable")] + [IgnoreBrowser(Browser.Edge, "Driver prepends text in contentEditable")] [IgnoreBrowser(Browser.Firefox, "Driver prepends text in contentEditable")] public void ShouldBeAbleToTypeIntoContentEditableElementWithExistingValue() { diff --git a/dotnet/test/common/UploadTest.cs b/dotnet/test/common/UploadTest.cs index 3bf4164ab30ce..8ee889f425a2c 100644 --- a/dotnet/test/common/UploadTest.cs +++ b/dotnet/test/common/UploadTest.cs @@ -27,7 +27,7 @@ public void Teardown() } [Test] - [IgnoreBrowser(Browser.Edge, "Frame switching causes browser hang")] + [IgnoreBrowser(Browser.EdgeLegacy, "Frame switching causes browser hang")] public void ShouldAllowFileUploading() { driver.Url = uploadPage; @@ -45,7 +45,7 @@ public void ShouldAllowFileUploading() } [Test] - [IgnoreBrowser(Browser.Edge, "Driver does not support clearing file upload elements")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver does not support clearing file upload elements")] public void CleanFileInput() { driver.Url = uploadPage; @@ -57,7 +57,7 @@ public void CleanFileInput() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome driver does not throw exception.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge driver does not throw exception.")] + [IgnoreBrowser(Browser.Edge, "Edge driver does not throw exception.")] public void ClickFileInput() { driver.Url = uploadPage; @@ -66,7 +66,7 @@ public void ClickFileInput() } [Test] - [IgnoreBrowser(Browser.Edge, "Frame switching causes browser hang")] + [IgnoreBrowser(Browser.EdgeLegacy, "Frame switching causes browser hang")] [IgnoreBrowser(Browser.Safari, "Safari driver hangs attempting to send keys to hidden file input")] public void UploadingWithHiddenFileInput() { @@ -92,7 +92,7 @@ public void UploadingWithHiddenFileInput() // Tests below here are not included in the Java test suite //------------------------------------------------------------------ [Test] - [IgnoreBrowser(Browser.Edge, "Frame switching causes browser hang")] + [IgnoreBrowser(Browser.EdgeLegacy, "Frame switching causes browser hang")] [IgnoreBrowser(Browser.Safari, "Attempting to upload with transparent element hangs Safari browser.")] public void ShouldAllowFileUploadingUsingTransparentUploadElement() { diff --git a/dotnet/test/common/WindowSwitchingTest.cs b/dotnet/test/common/WindowSwitchingTest.cs index b977ea3fb85b4..0c1fe5b1f3538 100644 --- a/dotnet/test/common/WindowSwitchingTest.cs +++ b/dotnet/test/common/WindowSwitchingTest.cs @@ -426,8 +426,8 @@ public void CloseShouldCloseCurrentHandleOnly() [Test] [IgnoreBrowser(Browser.Chrome, "Driver does not yet support new window command")] - [IgnoreBrowser(Browser.ChromiumEdge, "Driver does not yet support new window command")] [IgnoreBrowser(Browser.Edge, "Driver does not yet support new window command")] + [IgnoreBrowser(Browser.EdgeLegacy, "Driver does not yet support new window command")] public void ShouldBeAbleToCreateANewWindow() { driver.Url = xhtmlTestPage; diff --git a/dotnet/test/common/WindowTest.cs b/dotnet/test/common/WindowTest.cs index 461eb049dda25..453d7fcc52bb1 100644 --- a/dotnet/test/common/WindowTest.cs +++ b/dotnet/test/common/WindowTest.cs @@ -181,7 +181,7 @@ public void ShouldBeAbleToMaximizeTheWindowFromIframe() //------------------------------------------------------------------ [Test] - [IgnoreBrowser(Browser.Edge, "Edge driver does not implement the full screen command")] + [IgnoreBrowser(Browser.EdgeLegacy, "Edge driver does not implement the full screen command")] [IgnoreBrowser(Browser.Opera, "Not implemented in driver")] public void ShouldBeAbleToFullScreenTheCurrentWindow() { @@ -200,7 +200,7 @@ public void ShouldBeAbleToFullScreenTheCurrentWindow() [Test] [IgnoreBrowser(Browser.Chrome, "Chrome window size does not report zero when minimized.")] - [IgnoreBrowser(Browser.ChromiumEdge, "Edge window size does not report zero when minimized.")] + [IgnoreBrowser(Browser.Edge, "Edge window size does not report zero when minimized.")] [IgnoreBrowser(Browser.Opera, "Not implemented in driver")] public void ShouldBeAbleToMinimizeTheCurrentWindow() { diff --git a/dotnet/test/common/appconfig.json b/dotnet/test/common/appconfig.json index bd490ef82028e..39f7be2076284 100644 --- a/dotnet/test/common/appconfig.json +++ b/dotnet/test/common/appconfig.json @@ -20,85 +20,65 @@ }, "DriverConfigs": { "Chrome": { - "DriverTypeName": "OpenQA.Selenium.Chrome.ChromeDriver", - "AssemblyName": "WebDriver", - "BrowserValue": "Chrome", - "RemoteCapabilities": "chrome" - }, - - "ChromeSpec": { "DriverTypeName": "OpenQA.Selenium.Chrome.SpecCompliantChromeDriver", - "AssemblyName": "WebDriver.Chrome.Tests", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "Chrome", "RemoteCapabilities": "chrome" }, "ChromeDev": { "DriverTypeName": "OpenQA.Selenium.Chrome.DevChannelChromeDriver", - "AssemblyName": "WebDriver.Chrome.Tests", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "Chrome", "RemoteCapabilities": "chrome" }, "IE": { "DriverTypeName": "OpenQA.Selenium.IE.WindowFocusInternetExplorerDriver", - "AssemblyName": "WebDriver.IE.Tests", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "IE", "RemoteCapabilities": "internet explorer" }, "Edge": { - "DriverTypeName": "OpenQA.Selenium.Edge.DefaultEdgeDriver", - "AssemblyName": "WebDriver.Edge.Tests", - "BrowserValue": "Edge", - "RemoteCapabilities": "MicrosoftEdge" - }, - - "EdgeSpec": { - "DriverTypeName": "OpenQA.Selenium.Edge.SpecCompliantEdgeDriver", - "AssemblyName": "WebDriver.Edge.Tests", + "DriverTypeName": "OpenQA.Selenium.Edge.ChromiumEdgeDriver", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "Edge", "RemoteCapabilities": "MicrosoftEdge" }, - "ChromiumEdgeSpec": { - "DriverTypeName": "OpenQA.Selenium.Edge.ChromiumEdgeDriver", + "EdgeLegacy": { + "DriverTypeName": "OpenQA.Selenium.Edge.DefaultEdgeDriver", + "AssemblyName": "WebDriver.Common.Tests", "AssemblyName": "WebDriver.Edge.Tests", - "BrowserValue": "ChromiumEdge", + "BrowserValue": "EdgeLegacy", "RemoteCapabilities": "MicrosoftEdge" }, "Firefox": { "DriverTypeName": "OpenQA.Selenium.Firefox.ReleaseFirefoxWebDriver", - "AssemblyName": "WebDriver.Firefox.Tests", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "Firefox", "RemoteCapabilities": "firefox" }, "FirefoxNightly": { "DriverTypeName": "OpenQA.Selenium.Firefox.NightlyFirefoxWebDriver", - "AssemblyName": "WebDriver.Firefox.Tests", - "BrowserValue": "Firefox", - "RemoteCapabilities": "firefox" - }, - - "FirefoxLegacy": { - "DriverTypeName": "OpenQA.Selenium.Firefox.LegacyFirefoxWebDriver", - "AssemblyName": "WebDriver.Firefox.Tests", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "Firefox", "RemoteCapabilities": "firefox" }, "Safari": { "DriverTypeName": "OpenQA.Selenium.Safari.DefaultSafariDriver", - "AssemblyName": "WebDriver.Safari.Tests", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "Safari", "RemoteCapabilities": "safari" }, "SafariTechPreview": { "DriverTypeName": "OpenQA.Selenium.Safari.SafariTechnologyPreviewDriver", - "AssemblyName": "WebDriver.Safari.Tests", + "AssemblyName": "WebDriver.Common.Tests", "BrowserValue": "Safari", "RemoteCapabilities": "safari" },