Skip to content

Commit

Permalink
Ignore some alert tests on Firefox 27 - alerts no longer trigger for
Browse files Browse the repository at this point in the history
window.onunload and window.onclose (verified manually)
  • Loading branch information
jleyba committed Dec 19, 2013
1 parent a0cabc5 commit 411afbb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 411afbb

Please sign in to comment.