From 411afbba5785d792a25729617632def0973caf65 Mon Sep 17 00:00:00 2001 From: Jason Leyba Date: Wed, 18 Dec 2013 16:03:14 -0800 Subject: [PATCH] Ignore some alert tests on Firefox 27 - alerts no longer trigger for window.onunload and window.onclose (verified manually) --- java/client/test/org/openqa/selenium/AlertsTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/java/client/test/org/openqa/selenium/AlertsTest.java b/java/client/test/org/openqa/selenium/AlertsTest.java index 801908a34feef..57e8bedb2a3fb 100644 --- a/java/client/test/org/openqa/selenium/AlertsTest.java +++ b/java/client/test/org/openqa/selenium/AlertsTest.java @@ -41,6 +41,7 @@ import static org.openqa.selenium.testing.TestUtilities.isFirefox; import static org.openqa.selenium.testing.TestUtilities.isNativeEventsEnabled; import static org.openqa.selenium.testing.TestUtilities.getEffectivePlatform; +import static org.openqa.selenium.testing.TestUtilities.getFirefoxVersion; import org.openqa.selenium.support.ui.ExpectedCondition; import org.openqa.selenium.support.ui.WebDriverWait; @@ -387,6 +388,8 @@ public void testShouldNotHandleAlertInAnotherWindow() { @Ignore(value = {CHROME}) @Test public void testShouldHandleAlertOnPageUnload() { + assumeFalse("Firefox 27 does not trigger alerts on unload", + isFirefox(driver) && getFirefoxVersion(driver) >= 27); driver.findElement(By.id("open-page-with-onunload-alert")).click(); driver.navigate().back(); @@ -440,6 +443,8 @@ public void testShouldHandleAlertOnWindowClose() { System.err.println("x_ignore_nofocus can cause a firefox crash here. Ignoring test. See issue 2987."); assumeTrue(false); } + assumeFalse("Firefox 27 does not trigger alerts on unload", + isFirefox(driver) && getFirefoxVersion(driver) >= 27); String mainWindow = driver.getWindowHandle(); try { driver.findElement(By.id("open-window-with-onclose-alert")).click();