diff --git a/java/client/test/org/openqa/selenium/AlertsTest.java b/java/client/test/org/openqa/selenium/AlertsTest.java index ab11b85d083b5..d7f9e308c8224 100644 --- a/java/client/test/org/openqa/selenium/AlertsTest.java +++ b/java/client/test/org/openqa/selenium/AlertsTest.java @@ -329,7 +329,6 @@ public void testPromptShouldHaveNullValueIfDismissed() { } @Test - @Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1477977") public void testHandlesTwoAlertsFromOneInteraction() { driver.get(appServer.create(new Page() .withScripts( @@ -398,7 +397,7 @@ public void testShouldHandleAlertOnPageLoadUsingGet() { @Ignore(value = IE, reason = "Fails in versions 6 and 7") @Ignore(SAFARI) @Ignore(EDGE) - @Ignore(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/1187") + @NoDriverAfterTest public void testShouldNotHandleAlertInAnotherWindow() { String pageWithOnLoad = appServer.create(new Page() .withOnLoad("javascript:alert(\"onload\")") @@ -409,20 +408,11 @@ public void testShouldNotHandleAlertInAnotherWindow() { String mainWindow = driver.getWindowHandle(); Set currentWindowHandles = driver.getWindowHandles(); - try { - driver.findElement(By.id("open-new-window")).click(); - wait.until(newWindowIsOpened(currentWindowHandles)); + driver.findElement(By.id("open-new-window")).click(); + wait.until(newWindowIsOpened(currentWindowHandles)); - assertThatExceptionOfType(TimeoutException.class) - .isThrownBy(() -> wait.until(alertIsPresent())); - - } finally { - driver.switchTo().window("newwindow"); - wait.until(alertIsPresent()).dismiss(); - driver.close(); - driver.switchTo().window(mainWindow); - wait.until(textInElementLocated(By.id("open-new-window"), "open new window")); - } + assertThatExceptionOfType(TimeoutException.class) + .isThrownBy(() -> wait.until(alertIsPresent())); } @Test @@ -432,7 +422,7 @@ public void testShouldNotHandleAlertInAnotherWindow() { @Ignore(SAFARI) @NotYetImplemented(EDGE) public void testShouldHandleAlertOnPageUnload() { - assumeFalse("Firefox 27 does not trigger alerts on before unload", + assumeFalse("Firefox 27+ does not trigger alerts on before unload", isFirefox(driver) && getFirefoxVersion(driver) >= 27); String pageWithOnBeforeUnload = appServer.create(new Page() @@ -479,7 +469,7 @@ public void testShouldImplicitlyHandleAlertOnPageBeforeUnload() { @Ignore(value = IE, reason = "IE driver automatically dismisses alerts on window close") @NotYetImplemented(EDGE) public void testShouldHandleAlertOnWindowClose() { - assumeFalse("Firefox 27 does not trigger alerts on unload", + assumeFalse("Firefox 27+ does not trigger alerts on unload", isFirefox(driver) && getFirefoxVersion(driver) >= 27); String pageWithOnBeforeUnload = appServer.create(new Page() diff --git a/java/client/test/org/openqa/selenium/ClickScrollingTest.java b/java/client/test/org/openqa/selenium/ClickScrollingTest.java index e435a25e3557d..cc48b196178e4 100644 --- a/java/client/test/org/openqa/selenium/ClickScrollingTest.java +++ b/java/client/test/org/openqa/selenium/ClickScrollingTest.java @@ -136,7 +136,7 @@ public void testShouldNotScrollOverflowElementsWhichAreVisible() { @Test @Ignore(CHROME) @Ignore(CHROMIUMEDGE) - @Ignore(MARIONETTE) + @NotYetImplemented(MARIONETTE) @NotYetImplemented(EDGE) public void testShouldNotScrollIfAlreadyScrolledAndElementIsInView() { driver.get(appServer.whereIs("scroll3.html")); @@ -166,7 +166,7 @@ public void testShouldScrollOverflowElementsIfClickPointIsOutOfViewButElementIsI @SwitchToTopAfterTest @Test @NotYetImplemented(SAFARI) - @Ignore(MARIONETTE) + @NotYetImplemented(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1314462") public void testShouldBeAbleToClickElementInAFrameThatIsOutOfView() { driver.get(appServer.whereIs("scrolling_tests/page_with_frame_out_of_view.html")); driver.switchTo().frame("frame"); @@ -262,7 +262,7 @@ private long getScrollTop() { @SwitchToTopAfterTest @Test @NotYetImplemented(SAFARI) - @Ignore(MARIONETTE) + @NotYetImplemented(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1314462") public void testShouldBeAbleToClickElementInATallFrame() { driver.get(appServer.whereIs("scrolling_tests/page_with_tall_frame.html")); driver.switchTo().frame("tall_frame"); diff --git a/java/client/test/org/openqa/selenium/PageLoadingTest.java b/java/client/test/org/openqa/selenium/PageLoadingTest.java index c0299c47394ab..c203ddb8d86f7 100644 --- a/java/client/test/org/openqa/selenium/PageLoadingTest.java +++ b/java/client/test/org/openqa/selenium/PageLoadingTest.java @@ -195,7 +195,7 @@ public void testShouldBeAbleToGetAFragmentOnTheCurrentPage() { } @Test - @Ignore(MARIONETTE) + @NotYetImplemented(MARIONETTE) public void testShouldReturnWhenGettingAUrlThatDoesNotResolve() { assertThatCode( () -> driver.get("http://www.thisurldoesnotexist.comx/")) @@ -219,7 +219,7 @@ public void testShouldThrowIfUrlIsMalformedInPortPart() { } @Test - @Ignore(MARIONETTE) + @NotYetImplemented(MARIONETTE) public void testShouldReturnWhenGettingAUrlThatDoesNotConnect() { // Here's hoping that there's nothing here. There shouldn't be driver.get("http://localhost:3001");