[java] Ignoring a test for Firefox while it is debugged.
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;
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 {
@@ -174,6 +183,7 @@ public void testShouldAllowAUserToDismissAPrompt() {
}
@Test
+ @Ignore(value = FIREFOX, reason = "Hangs")
public void testShouldAllowAUserToSetTheValueOfAPrompt() {
driver.get(promptPage(null));
@@ -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\")")
@@ -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; }",
