Skip to content

Commit

Permalink
[java] Ignoring a test for Firefox while it is debugged.
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Aug 24, 2021
1 parent d548975 commit eb31a2c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions java/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
import static org.openqa.selenium.testing.drivers.Browser.CHROME;
import static org.openqa.selenium.testing.drivers.Browser.EDGE;
import static org.openqa.selenium.testing.drivers.Browser.LEGACY_FIREFOX_XPI;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.HTMLUNIT;
import static org.openqa.selenium.testing.drivers.Browser.IE;
import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
import static org.openqa.selenium.testing.drivers.Browser.LEGACY_FIREFOX_XPI;
import static org.openqa.selenium.testing.drivers.Browser.SAFARI;

import org.junit.After;
Expand All @@ -45,6 +45,15 @@

public class AlertsTest extends JUnit4TestBase {

private static ExpectedCondition<Boolean> textInElementLocated(
final By locator, final String text) {
return driver -> text.equals(driver.findElement(locator).getText());
}

private static ExpectedCondition<WebDriver> ableToSwitchToWindow(final String name) {
return driver -> driver.switchTo().window(name);
}

@After
public void closeAlertIfPresent() {
try {
Expand Down Expand Up @@ -174,6 +183,7 @@ public void testShouldAllowAUserToDismissAPrompt() {
}

@Test
@Ignore(value = FIREFOX, reason = "Hangs")
public void testShouldAllowAUserToSetTheValueOfAPrompt() {
driver.get(promptPage(null));

Expand Down Expand Up @@ -352,6 +362,7 @@ public void testHandlesTwoAlertsFromOneInteraction() {
}

@Test
@Ignore(value = FIREFOX, reason = "Hangs")
public void testShouldHandleAlertOnPageLoad() {
String pageWithOnLoad = appServer.create(new Page()
.withOnLoad("javascript:alert(\"onload\")")
Expand Down Expand Up @@ -466,15 +477,6 @@ public void shouldHandleAlertOnFormSubmit() {
assertThat(driver.getTitle()).isEqualTo("Testing Alerts");
}

private static ExpectedCondition<Boolean> textInElementLocated(
final By locator, final String text) {
return driver -> text.equals(driver.findElement(locator).getText());
}

private static ExpectedCondition<WebDriver> ableToSwitchToWindow(final String name) {
return driver -> driver.switchTo().window(name);
}

private void setSimpleOnBeforeUnload(Object returnText) {
((JavascriptExecutor) driver).executeScript(
"var returnText = arguments[0]; window.onbeforeunload = function() { return returnText; }",
Expand Down

0 comments on commit eb31a2c

Please sign in to comment.