Skip to content

Commit

Permalink
More .NET test updates for Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed May 27, 2018
1 parent fdef210 commit 5839b38
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions dotnet/test/common/CorrectEventFiringTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void ShouldFireMouseOverEventWhenClicking()
}

[Test]
[IgnoreBrowser(Browser.Edge, "Test hangs browser, reason unknown")]

[IgnoreBrowser(Browser.Firefox, "Firefox does not report mouse move event when clicking")]
public void ShouldFireMouseMoveEventWhenClicking()
Expand Down Expand Up @@ -283,6 +284,7 @@ public void SendingKeysToAnotherElementShouldCauseTheBlurEventToFire()
}

[Test]
[IgnoreBrowser(Browser.Edge, "Test crashes browser, causing cascading failures.")]
[IgnoreBrowser(Browser.Firefox, "https://github.com/mozilla/geckodriver/issues/906")]
[IgnoreBrowser(Browser.Safari, "Not yet implemented")]
public void SendingKeysToAnotherElementShouldCauseTheBlurEventToFireInNonTopmostWindow()
Expand Down
1 change: 1 addition & 0 deletions dotnet/test/common/PageLoadingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ public void ShouldTimeoutIfAPageTakesTooLongToRefresh()
}

[Test]
[IgnoreBrowser(Browser.Edge, "Test hangs browser.")]
[IgnoreBrowser(Browser.Chrome, "Not implemented for browser")]
[IgnoreBrowser(Browser.Opera, "Not implemented for browser")]
[IgnoreBrowser(Browser.Safari, "Not implemented for browser")]
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/PartialLinkTextMatchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void DriverCanGetLinkByLinkTestIgnoringTrailingWhitespace()
}

[Test]
public void testElementCanGetLinkByLinkTestIgnoringTrailingWhitespace()
public void ElementCanGetLinkByLinkTestIgnoringTrailingWhitespace()
{
driver.Url = simpleTestPage;
IWebElement elem = driver.FindElement(By.Id("links"));
Expand Down
7 changes: 7 additions & 0 deletions dotnet/test/common/UnexpectedAlertBehaviorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,48 @@ public void QuitDriver()

[Test]
[IgnoreBrowser(Browser.Chrome, "Legacy behavior, not spec compliant")]
[IgnoreBrowser(Browser.Edge, "Legacy behavior, not spec compliant")]
public void CanAcceptUnhandledAlert()
{

ExecuteTestWithUnhandledPrompt(UnhandledPromptBehavior.AcceptAndNotify, "This is a default value");
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Legacy behavior, not spec compliant")]
[IgnoreBrowser(Browser.Edge, "Legacy behavior, not spec compliant")]
public void CanSilentlyAcceptUnhandledAlert()
{
ExecuteTestWithUnhandledPrompt(UnhandledPromptBehavior.Accept, "This is a default value");
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Unstable Chrome behavior")]
[IgnoreBrowser(Browser.Edge, "Legacy behavior, not spec compliant")]
public void CanDismissUnhandledAlert()
{
ExecuteTestWithUnhandledPrompt(UnhandledPromptBehavior.DismissAndNotify, "null");
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Legacy behavior, not spec compliant")]
[IgnoreBrowser(Browser.Edge, "Legacy behavior, not spec compliant")]
public void CanSilentlyDismissUnhandledAlert()
{
ExecuteTestWithUnhandledPrompt(UnhandledPromptBehavior.Dismiss, "null");
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Chrome uses IGNORE mode by default")]
[IgnoreBrowser(Browser.Edge, "Legacy behavior, not spec compliant")]
public void CanDismissUnhandledAlertsByDefault()
{
ExecuteTestWithUnhandledPrompt(UnhandledPromptBehavior.Default, "null");
}

[Test]
[IgnoreBrowser(Browser.Chrome, "Unstable Chrome behavior")]
[IgnoreBrowser(Browser.Edge, "Legacy behavior, not spec compliant")]
public void CanIgnoreUnhandledAlert()
{
Assert.That(() => ExecuteTestWithUnhandledPrompt(UnhandledPromptBehavior.Ignore, "Text ignored"), Throws.InstanceOf<WebDriverException>().With.InnerException.InstanceOf<UnhandledAlertException>());
Expand Down
7 changes: 5 additions & 2 deletions dotnet/test/common/UploadTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public void Teardown()
}

[Test]
[IgnoreBrowser(Browser.Edge, "Frame switching causes browser hang")]
public void ShouldAllowFileUploading()
{
driver.Url = uploadPage;
Expand All @@ -37,14 +38,14 @@ public void ShouldAllowFileUploading()

IWebElement body = null;
WaitFor(() => {
body = driver.FindElement(By.XPath("//body"));
body = driver.FindElement(By.CssSelector("body"));
return LoremIpsumText == body.Text;
}, "Page source is: " + driver.PageSource);
Assert.IsTrue(LoremIpsumText == body.Text, "Page source is: " + driver.PageSource);
driver.Url = "about:blank";
}

[Test]
[IgnoreBrowser(Browser.Edge, "Driver does not support clearing file upload elements")]
public void CleanFileInput()
{
driver.Url = uploadPage;
Expand All @@ -65,6 +66,7 @@ public void ClickFileInput()

[Test]
[IgnoreBrowser(Browser.Safari, "Hangs forever in sendKeys")]
[IgnoreBrowser(Browser.Edge, "Frame switching causes browser hang")]
public void UploadingWithHiddenFileInput()
{
driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("upload_invisible.html");
Expand All @@ -89,6 +91,7 @@ public void UploadingWithHiddenFileInput()
// Tests below here are not included in the Java test suite
//------------------------------------------------------------------
[Test]
[IgnoreBrowser(Browser.Edge, "Frame switching causes browser hang")]
public void ShouldAllowFileUploadingUsingTransparentUploadElement()
{
if (TestUtilities.IsMarionette(driver))
Expand Down
1 change: 1 addition & 0 deletions dotnet/test/edge/DefaultEdgeDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static EdgeDriverService DefaultService
get
{
EdgeDriverService service = EdgeDriverService.CreateDefaultService();
service.UseSpecCompliantProtocol = false;
return service;
}
}
Expand Down

0 comments on commit 5839b38

Please sign in to comment.