diff --git a/Rakefile b/Rakefile
index 07ba0d5a8e702..ab202206d10ea 100644
--- a/Rakefile
+++ b/Rakefile
@@ -136,7 +136,6 @@ task :all => [
task :all_zip => [:'selenium-java_zip']
task :tests => [
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit",
- "//java/client/test/org/openqa/selenium/htmlunit:htmlunit-no-js",
"//java/client/test/org/openqa/selenium/firefox:test-synthesized",
"//java/client/test/org/openqa/selenium/ie:ie",
"//java/client/test/org/openqa/selenium/chrome:chrome",
@@ -188,7 +187,6 @@ task :test_chrome_atoms => [
'//javascript/chrome-driver:test:run',
'//javascript/webdriver:test_chrome:run']
task :test_htmlunit => [
- "//java/client/test/org/openqa/selenium/htmlunit:htmlunit-no-js:run",
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit:run"
]
task :test_grid => [
diff --git a/java/client/src/org/openqa/selenium/remote/DesiredCapabilities.java b/java/client/src/org/openqa/selenium/remote/DesiredCapabilities.java
index 1a3793d0d31d8..d60dfab8ca1b1 100644
--- a/java/client/src/org/openqa/selenium/remote/DesiredCapabilities.java
+++ b/java/client/src/org/openqa/selenium/remote/DesiredCapabilities.java
@@ -203,13 +203,6 @@ public static DesiredCapabilities htmlUnit() {
return new DesiredCapabilities(BrowserType.HTMLUNIT, "", Platform.ANY);
}
- public static DesiredCapabilities htmlUnitWithJs() {
- DesiredCapabilities capabilities = new DesiredCapabilities(BrowserType.HTMLUNIT,
- "", Platform.ANY);
- capabilities.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true);
- return capabilities;
- }
-
public static DesiredCapabilities edge() {
return new DesiredCapabilities(BrowserType.EDGE, "", Platform.WINDOWS);
}
diff --git a/java/client/test/org/openqa/selenium/AlertsTest.java b/java/client/test/org/openqa/selenium/AlertsTest.java
index d346aa16d04cd..a026a59b6072f 100644
--- a/java/client/test/org/openqa/selenium/AlertsTest.java
+++ b/java/client/test/org/openqa/selenium/AlertsTest.java
@@ -43,7 +43,6 @@
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.NotYetImplemented;
@@ -78,7 +77,6 @@ private String promptPage(String defaultText) {
"
acceptor
"));
}
- @JavascriptEnabled
@NoDriverAfterTest
@Test
public void testShouldBeAbleToOverrideTheWindowAlertMethod() {
@@ -92,7 +90,6 @@ public void testShouldBeAbleToOverrideTheWindowAlertMethod() {
assertEquals("Testing Alerts", driver.getTitle());
}
- @JavascriptEnabled
@Test
public void testShouldAllowUsersToAcceptAnAlertManually() {
driver.get(alertPage("cheese"));
@@ -105,7 +102,6 @@ public void testShouldAllowUsersToAcceptAnAlertManually() {
assertEquals("Testing Alerts", driver.getTitle());
}
- @JavascriptEnabled
@Test
public void testShouldAllowUsersToAcceptAnAlertWithNoTextManually() {
driver.get(alertPage(""));
@@ -118,7 +114,6 @@ public void testShouldAllowUsersToAcceptAnAlertWithNoTextManually() {
assertEquals("Testing Alerts", driver.getTitle());
}
- @JavascriptEnabled
@NeedsLocalEnvironment(reason = "Carefully timing based")
@Test
@Ignore(CHROME)
@@ -144,7 +139,6 @@ public void testShouldGetTextOfAlertOpenedInSetTimeout() throws Exception {
}
}
- @JavascriptEnabled
@Test
public void testShouldAllowUsersToDismissAnAlertManually() {
driver.get(alertPage("cheese"));
@@ -157,7 +151,6 @@ public void testShouldAllowUsersToDismissAnAlertManually() {
assertEquals("Testing Alerts", driver.getTitle());
}
- @JavascriptEnabled
@Test
public void testShouldAllowAUserToAcceptAPrompt() {
driver.get(promptPage(null));
@@ -170,7 +163,6 @@ public void testShouldAllowAUserToAcceptAPrompt() {
assertEquals("Testing Prompt", driver.getTitle());
}
- @JavascriptEnabled
@Test
public void testShouldAllowAUserToDismissAPrompt() {
driver.get(promptPage(null));
@@ -183,7 +175,6 @@ public void testShouldAllowAUserToDismissAPrompt() {
assertEquals("Testing Prompt", driver.getTitle());
}
- @JavascriptEnabled
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
public void testShouldAllowAUserToSetTheValueOfAPrompt() {
driver.get(promptPage(null));
@@ -196,7 +187,6 @@ public void testShouldAllowAUserToSetTheValueOfAPrompt() {
wait.until(textInElementLocated(By.id("text"), "cheese"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/274")
@@ -214,7 +204,6 @@ public void testSettingTheValueOfAnAlertThrows() {
}
}
- @JavascriptEnabled
@Test
public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
driver.get(alertPage("cheese"));
@@ -227,7 +216,6 @@ public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
assertEquals("cheese", value);
}
- @JavascriptEnabled
@Test
public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
driver.get(promptPage(null));
@@ -240,7 +228,6 @@ public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
assertEquals("Enter something", value);
}
- @JavascriptEnabled
@Test
public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
driver.get(alertPage("cheese"));
@@ -253,7 +240,6 @@ public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
assertThat(t, instanceOf(NoAlertPresentException.class));
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
@Ignore(MARIONETTE)
@@ -273,7 +259,6 @@ public void testShouldAllowUsersToAcceptAnAlertInAFrame() {
assertEquals("Testing Alerts", driver.getTitle());
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
@Ignore(MARIONETTE)
@@ -296,7 +281,6 @@ public void testShouldAllowUsersToAcceptAnAlertInANestedFrame() {
assertEquals("Testing Alerts", driver.getTitle());
}
- @JavascriptEnabled
@Test
public void testSwitchingToMissingAlertThrows() throws Exception {
driver.get(alertPage("cheese"));
@@ -305,7 +289,6 @@ public void testSwitchingToMissingAlertThrows() throws Exception {
assertThat(t, instanceOf(NoAlertPresentException.class));
}
- @JavascriptEnabled
@Test
public void testSwitchingToMissingAlertInAClosedWindowThrows() throws Exception {
String blank = appServer.create(new Page());
@@ -327,7 +310,6 @@ public void testSwitchingToMissingAlertInAClosedWindowThrows() throws Exception
}
}
- @JavascriptEnabled
@Test
public void testPromptShouldUseDefaultValueIfNoKeysSent() {
driver.get(promptPage("This is a default value"));
@@ -339,7 +321,6 @@ public void testPromptShouldUseDefaultValueIfNoKeysSent() {
wait.until(textInElementLocated(By.id("text"), "This is a default value"));
}
- @JavascriptEnabled
@Test
public void testPromptShouldHaveNullValueIfDismissed() {
driver.get(promptPage("This is a default value"));
@@ -351,7 +332,6 @@ public void testPromptShouldHaveNullValueIfDismissed() {
wait.until(textInElementLocated(By.id("text"), "null"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
public void testHandlesTwoAlertsFromOneInteraction() {
@@ -382,7 +362,6 @@ public void testHandlesTwoAlertsFromOneInteraction() {
wait.until(textInElementLocated(By.id("text2"), "cheddar"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
public void testShouldHandleAlertOnPageLoad() {
@@ -401,7 +380,6 @@ public void testShouldHandleAlertOnPageLoad() {
wait.until(textInElementLocated(By.tagName("p"), "Page with onload event handler"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
public void testShouldHandleAlertOnPageLoadUsingGet() {
@@ -417,7 +395,6 @@ public void testShouldHandleAlertOnPageLoadUsingGet() {
wait.until(textInElementLocated(By.tagName("p"), "Page with onload event handler"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(FIREFOX)
@@ -450,7 +427,6 @@ public void testShouldNotHandleAlertInAnotherWindow() {
}
}
- @JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
@NotYetImplemented(HTMLUNIT)
@@ -475,7 +451,6 @@ public void testShouldHandleAlertOnPageUnload() {
wait.until(textInElementLocated(By.id("link"), "open new page"));
}
- @JavascriptEnabled
@Test
public void testShouldHandleAlertOnPageBeforeUnload() {
String blank = appServer.create(new Page().withTitle("Success"));
@@ -499,7 +474,6 @@ public void testShouldHandleAlertOnPageBeforeUnload() {
wait.until(titleIs("Success"));
}
- @JavascriptEnabled
@NoDriverAfterTest
@Test
public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
@@ -518,7 +492,6 @@ public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
driver.quit();
}
- @JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
@NotYetImplemented(HTMLUNIT)
@@ -551,7 +524,6 @@ public void testShouldHandleAlertOnWindowClose() {
}
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@NotYetImplemented(value = MARIONETTE,
@@ -568,7 +540,6 @@ public void testIncludesAlertTextInUnhandledAlertException() {
assertThat(t.getMessage(), containsString("cheese"));
}
- @JavascriptEnabled
@NoDriverAfterTest
@Test
public void testCanQuitWhenAnAlertIsPresent() {
@@ -580,7 +551,6 @@ public void testCanQuitWhenAnAlertIsPresent() {
driver.quit();
}
- @JavascriptEnabled
@Test
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/620")
public void shouldHandleAlertOnFormSubmit() {
diff --git a/java/client/test/org/openqa/selenium/AtomsInjectionTest.java b/java/client/test/org/openqa/selenium/AtomsInjectionTest.java
index 8829f4b28b9ca..e374c7b0773fe 100644
--- a/java/client/test/org/openqa/selenium/AtomsInjectionTest.java
+++ b/java/client/test/org/openqa/selenium/AtomsInjectionTest.java
@@ -21,11 +21,9 @@
import org.junit.Test;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
public class AtomsInjectionTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
public void testInjectingAtomShouldNotTrampleOnUnderscoreGlobal() {
driver.get(pages.underscorePage);
diff --git a/java/client/test/org/openqa/selenium/ClickScrollingTest.java b/java/client/test/org/openqa/selenium/ClickScrollingTest.java
index db44f970c7449..d40eb861fc771 100644
--- a/java/client/test/org/openqa/selenium/ClickScrollingTest.java
+++ b/java/client/test/org/openqa/selenium/ClickScrollingTest.java
@@ -37,13 +37,11 @@
import org.openqa.selenium.interactions.MoveTargetOutOfBoundsException;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
@Ignore(value = HTMLUNIT, reason = "Scrolling requires rendering")
public class ClickScrollingTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
public void testClickingOnAnchorScrollsPage() {
String scrollScript = "";
@@ -86,7 +84,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByOverflow() {
assertEquals("line8", driver.findElement(By.id("clicked")).getText());
}
- @JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "failed")
public void testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow() {
@@ -96,7 +93,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow() {
wait.until(titleIs("Clicked Successfully!"));
}
- @JavascriptEnabled
@Test
@Ignore(value = SAFARI, reason = "failed")
public void testShouldBeAbleToClickOnAnElementHiddenByYOverflow() {
@@ -106,7 +102,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByYOverflow() {
wait.until(titleIs("Clicked Successfully!"));
}
- @JavascriptEnabled
@Test
public void testShouldNotScrollOverflowElementsWhichAreVisible() {
driver.get(appServer.whereIs("scroll2.html"));
@@ -118,7 +113,6 @@ public void testShouldNotScrollOverflowElementsWhichAreVisible() {
assertEquals("Should not have scrolled", 0, yOffset);
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(PHANTOMJS)
@@ -219,7 +213,6 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrameThatIsOut
assertTrue(element.isSelected());
}
- @JavascriptEnabled
@Test
public void testShouldNotScrollWhenGettingElementSize() {
driver.get(appServer.whereIs("scroll3.html"));
diff --git a/java/client/test/org/openqa/selenium/ClickTest.java b/java/client/test/org/openqa/selenium/ClickTest.java
index 5f3ee8cb06a6a..d21866fe7c542 100644
--- a/java/client/test/org/openqa/selenium/ClickTest.java
+++ b/java/client/test/org/openqa/selenium/ClickTest.java
@@ -40,7 +40,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
@@ -68,7 +67,6 @@ public void testCanClickOnALinkThatOverflowsAndFollowIt() {
wait.until(titleIs("XHTML Test Page"));
}
- @JavascriptEnabled
@Test
public void testCanClickOnAnAnchorAndNotReloadThePage() {
((JavascriptExecutor) driver).executeScript("document.latch = true");
@@ -92,7 +90,6 @@ public void testCanClickOnALinkThatUpdatesAnotherFrame() {
wait.until(pageSourceToContain("Hello WebDriver"));
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
public void testElementsFoundByJsCanLoadUpdatesInAnotherFrame() {
@@ -107,7 +104,6 @@ public void testElementsFoundByJsCanLoadUpdatesInAnotherFrame() {
wait.until(pageSourceToContain("Hello WebDriver"));
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
public void testJsLocatedElementsCanUpdateFramesIfFoundSomehowElse() {
@@ -126,7 +122,6 @@ public void testJsLocatedElementsCanUpdateFramesIfFoundSomehowElse() {
wait.until(pageSourceToContain("Hello WebDriver"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testCanClickOnAnElementWithTopSetToANegativeNumber() {
@@ -147,7 +142,6 @@ public void testShouldClickOnFirstBoundingClientRectWithNonZeroSize() {
wait.until(titleIs("XHTML Test Page"));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testShouldSetRelatedTargetForMouseOver() {
@@ -160,7 +154,6 @@ public void testShouldSetRelatedTargetForMouseOver() {
assertEquals("parent matches? true", log);
}
- @JavascriptEnabled
@NoDriverAfterTest
@Test
@Ignore(value = SAFARI, reason = "issue 3693")
@@ -331,7 +324,6 @@ public void testShouldBeAbleToClickOnLinkInAbsolutelyPositionedFooterInQuirksMod
wait.until(titleIs("XHTML Test Page"));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToClickOnLinksWithNoHrefAttribute() {
driver.get(pages.javascriptPage);
@@ -342,7 +334,6 @@ public void testShouldBeAbleToClickOnLinksWithNoHrefAttribute() {
wait.until(titleIs("Changed"));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToClickOnALinkThatWrapsToTheNextLine() {
driver.get(appServer.whereIs("click_tests/link_that_wraps.html"));
@@ -352,7 +343,6 @@ public void testShouldBeAbleToClickOnALinkThatWrapsToTheNextLine() {
wait.until(titleIs("Submitted Successfully!"));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToClickOnASpanThatWrapsToTheNextLine() {
driver.get(appServer.whereIs("click_tests/span_that_wraps.html"));
@@ -362,7 +352,6 @@ public void testShouldBeAbleToClickOnASpanThatWrapsToTheNextLine() {
wait.until(titleIs("Submitted Successfully!"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
diff --git a/java/client/test/org/openqa/selenium/ContentEditableTest.java b/java/client/test/org/openqa/selenium/ContentEditableTest.java
index 77dbd8b43cde3..4640436d3e9be 100644
--- a/java/client/test/org/openqa/selenium/ContentEditableTest.java
+++ b/java/client/test/org/openqa/selenium/ContentEditableTest.java
@@ -33,7 +33,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
public class ContentEditableTest extends JUnit4TestBase {
@@ -43,7 +42,6 @@ public void switchToDefaultContent() {
driver.switchTo().defaultContent();
}
- @JavascriptEnabled
@Test
@Ignore(value = SAFARI, reason = "cannot type on contentEditable with synthetic events")
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -66,7 +64,6 @@ public void testTypingIntoAnIFrameWithContentEditableOrDesignModeSet() {
assertThat(id.getText(), anyOf(equalTo("[frameHtml]"), equalTo("[theBody]")));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testNonPrintableCharactersShouldWorkWithContentEditableOrDesignModeSet() {
@@ -111,7 +108,6 @@ public void testShouldBeAbleToTypeIntoContentEditableElementWithExistingValue()
assertThat(editable.getText(), equalTo(initialText + ", edited"));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(value = SAFARI, reason = "cannot type on contentEditable with synthetic events, issue 3127")
@@ -128,7 +124,6 @@ public void testShouldBeAbleToTypeIntoTinyMCE() {
assertThat(editable.getText(), equalTo("cheese"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
diff --git a/java/client/test/org/openqa/selenium/CookieImplementationTest.java b/java/client/test/org/openqa/selenium/CookieImplementationTest.java
index eae94dab62e5e..34df1ec20c9b9 100644
--- a/java/client/test/org/openqa/selenium/CookieImplementationTest.java
+++ b/java/client/test/org/openqa/selenium/CookieImplementationTest.java
@@ -40,7 +40,6 @@
import org.openqa.selenium.environment.DomainHelper;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
import java.net.URI;
@@ -79,7 +78,6 @@ public void setUp() throws Exception {
assertNoCookiesArePresent();
}
- @JavascriptEnabled
@Test
public void testShouldGetCookieByName() {
String key = generateUniqueKey();
@@ -92,7 +90,6 @@ public void testShouldGetCookieByName() {
assertEquals(value, cookie.getValue());
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToAddCookie() {
String key = generateUniqueKey();
@@ -133,7 +130,6 @@ public void testGetAllCookies() {
assertTrue(cookies.contains(two));
}
- @JavascriptEnabled
@Test
public void testDeleteAllCookies() {
addCookieOnServerSide(new Cookie("foo", "set"));
@@ -147,7 +143,6 @@ public void testDeleteAllCookies() {
assertNoCookiesArePresent();
}
- @JavascriptEnabled
@Test
public void testDeleteCookieWithName() {
String key1 = generateUniqueKey();
diff --git a/java/client/test/org/openqa/selenium/CorrectEventFiringTest.java b/java/client/test/org/openqa/selenium/CorrectEventFiringTest.java
index 3a159f6dd48d8..fc5c84210fc08 100644
--- a/java/client/test/org/openqa/selenium/CorrectEventFiringTest.java
+++ b/java/client/test/org/openqa/selenium/CorrectEventFiringTest.java
@@ -45,7 +45,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.TestUtilities;
import org.openqa.selenium.testing.drivers.SauceDriver;
@@ -56,7 +55,6 @@
public class CorrectEventFiringTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
public void testShouldFireFocusEventWhenClicking() {
driver.get(pages.javascriptPage);
@@ -66,7 +64,6 @@ public void testShouldFireFocusEventWhenClicking() {
assertEventFired("focus");
}
- @JavascriptEnabled
@Test
public void testShouldFireClickEventWhenClicking() {
driver.get(pages.javascriptPage);
@@ -76,7 +73,6 @@ public void testShouldFireClickEventWhenClicking() {
assertEventFired("click");
}
- @JavascriptEnabled
@Test
public void testShouldFireMouseDownEventWhenClicking() {
driver.get(pages.javascriptPage);
@@ -86,7 +82,6 @@ public void testShouldFireMouseDownEventWhenClicking() {
assertEventFired("mousedown");
}
- @JavascriptEnabled
@Test
public void testShouldFireMouseUpEventWhenClicking() {
driver.get(pages.javascriptPage);
@@ -96,7 +91,6 @@ public void testShouldFireMouseUpEventWhenClicking() {
assertEventFired("mouseup");
}
- @JavascriptEnabled
@Test
public void testShouldFireMouseOverEventWhenClicking() {
driver.get(pages.javascriptPage);
@@ -106,7 +100,6 @@ public void testShouldFireMouseOverEventWhenClicking() {
assertEventFired("mouseover");
}
- @JavascriptEnabled
@Test
public void testShouldNotThrowIfEventHandlerThrows() {
driver.get(pages.javascriptPage);
@@ -118,7 +111,6 @@ public void testShouldNotThrowIfEventHandlerThrows() {
}
}
- @JavascriptEnabled
@Test
public void testShouldFireEventsInTheRightOrder() {
driver.get(pages.javascriptPage);
@@ -137,7 +129,6 @@ public void testShouldFireEventsInTheRightOrder() {
}
}
- @JavascriptEnabled
@Test
public void testsShouldIssueMouseDownEvents() {
driver.get(pages.javascriptPage);
@@ -148,7 +139,6 @@ public void testsShouldIssueMouseDownEvents() {
assertThat(result, equalTo("mouse down"));
}
- @JavascriptEnabled
@Test
public void testShouldIssueClickEvents() {
driver.get(pages.javascriptPage);
@@ -159,7 +149,6 @@ public void testShouldIssueClickEvents() {
assertThat(result.getText(), equalTo("mouse click"));
}
- @JavascriptEnabled
@Test
public void testShouldIssueMouseUpEvents() {
driver.get(pages.javascriptPage);
@@ -170,7 +159,6 @@ public void testShouldIssueMouseUpEvents() {
assertThat(result.getText(), equalTo("mouse up"));
}
- @JavascriptEnabled
@Test
public void testMouseEventsShouldBubbleUpToContainingElements() {
driver.get(pages.javascriptPage);
@@ -181,7 +169,6 @@ public void testMouseEventsShouldBubbleUpToContainingElements() {
assertThat(result.getText(), equalTo("mouse down"));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testShouldEmitOnChangeEventsWhenSelectingElements() {
@@ -200,7 +187,6 @@ public void testShouldEmitOnChangeEventsWhenSelectingElements() {
assertThat(driver.findElement(By.id("result")).getText(), equalTo("bar"));
}
- @JavascriptEnabled
@Test
public void testShouldEmitOnClickEventsWhenSelectingElements() {
driver.get(pages.javascriptPage);
@@ -216,7 +202,6 @@ public void testShouldEmitOnClickEventsWhenSelectingElements() {
assertThat(driver.findElement(By.id("result")).getText(), equalTo("bar"));
}
- @JavascriptEnabled
@Test
@Ignore(value = IE, reason = "Only fires the onchange event when the checkbox loses the focus")
public void testShouldEmitOnChangeEventsWhenChangingTheStateOfACheckbox() {
@@ -228,7 +213,6 @@ public void testShouldEmitOnChangeEventsWhenChangingTheStateOfACheckbox() {
wait.until(elementTextToEqual(result, "checkbox thing"));
}
- @JavascriptEnabled
@Test
public void testShouldEmitClickEventWhenClickingOnATextInputElement() {
driver.get(pages.javascriptPage);
@@ -240,7 +224,6 @@ public void testShouldEmitClickEventWhenClickingOnATextInputElement() {
assertThat(clicker.getAttribute("value"), equalTo("Clicked"));
}
- @JavascriptEnabled
@Test
public void testShouldFireTwoClickEventsWhenClickingOnALabel() {
driver.get(pages.javascriptPage);
@@ -251,7 +234,6 @@ public void testShouldFireTwoClickEventsWhenClickingOnALabel() {
assertNotNull(wait.until(elementTextToContain(result, "labelclick chboxclick")));
}
- @JavascriptEnabled
@Test
public void testClearingAnElementShouldCauseTheOnChangeHandlerToFire() {
driver.get(pages.javascriptPage);
@@ -263,7 +245,6 @@ public void testClearingAnElementShouldCauseTheOnChangeHandlerToFire() {
assertThat(result.getText(), equalTo("Cleared"));
}
- @JavascriptEnabled
@Test
public void testSendingKeysToAnotherElementShouldCauseTheBlurEventToFire() {
assumeFalse(browserNeedsFocusOnThisOs(driver));
@@ -276,7 +257,6 @@ public void testSendingKeysToAnotherElementShouldCauseTheBlurEventToFire() {
assertEventFired("blur");
}
- @JavascriptEnabled
@Test
public void testSendingKeysToAnElementShouldCauseTheFocusEventToFire() {
assumeFalse(browserNeedsFocusOnThisOs(driver));
@@ -287,7 +267,6 @@ public void testSendingKeysToAnElementShouldCauseTheFocusEventToFire() {
assertEventFired("focus");
}
- @JavascriptEnabled
@Test
public void testSendingKeysToAFocusedElementShouldNotBlurThatElement() {
assumeFalse(browserNeedsFocusOnThisOs(driver));
@@ -319,7 +298,6 @@ public void testSendingKeysToAFocusedElementShouldNotBlurThatElement() {
assertEventNotFired("blur");
}
- @JavascriptEnabled
@Test
@Ignore(SAFARI)
@NotYetImplemented(HTMLUNIT)
@@ -340,7 +318,6 @@ public void testClickingAnUnfocusableChildShouldNotBlurTheParent() {
assertEventFired("blur");
}
- @JavascriptEnabled
@Test
public void testSubmittingFormFromFormElementShouldFireOnSubmitForThatForm() {
driver.get(pages.javascriptPage);
@@ -349,7 +326,6 @@ public void testSubmittingFormFromFormElementShouldFireOnSubmitForThatForm() {
assertEventFired("form-onsubmit");
}
- @JavascriptEnabled
@Test
public void testSubmittingFormFromFormInputSubmitElementShouldFireOnSubmitForThatForm() {
driver.get(pages.javascriptPage);
@@ -358,7 +334,6 @@ public void testSubmittingFormFromFormInputSubmitElementShouldFireOnSubmitForTha
assertEventFired("form-onsubmit");
}
- @JavascriptEnabled
@Test
public void testSubmittingFormFromFormInputTextElementShouldFireOnSubmitForThatFormAndNotClickOnThatInput() {
driver.get(pages.javascriptPage);
@@ -368,7 +343,6 @@ public void testSubmittingFormFromFormInputTextElementShouldFireOnSubmitForThatF
assertEventNotFired("text-onclick");
}
- @JavascriptEnabled
@Test
@Ignore(value = SAFARI, reason = "Does not yet support file uploads, issue 4220")
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -392,7 +366,6 @@ private String getTextFromElementOnceAvailable(String elementId) {
return wait.until(visibilityOfElementLocated(By.id(elementId))).getText();
}
- @JavascriptEnabled
@Test
public void testShouldReportTheXAndYCoordinatesWhenClicking() {
assumeFalse("Skipping test which fails in IE on Sauce",
@@ -410,7 +383,6 @@ public void testShouldReportTheXAndYCoordinatesWhenClicking() {
assertThat(clientY, not(equalTo("0")));
}
- @JavascriptEnabled
@Test
public void testClickEventsShouldBubble() {
driver.get(pages.clicksPage);
@@ -419,7 +391,6 @@ public void testClickEventsShouldBubble() {
assertTrue("Event didn't bubble up", eventBubbled);
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
@@ -434,7 +405,6 @@ public void testClickOverlappingElements() {
assertThat(t.getMessage(), containsString("Other element would receive the click"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -459,7 +429,6 @@ public void testClickPartiallyOverlappingElements() {
}
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(FIREFOX)
@@ -479,7 +448,6 @@ public void testNativelyClickOverlappingElements() {
+ "click in over (handled by body)");
}
- @JavascriptEnabled
@Test
@Ignore(SAFARI)
@Ignore(HTMLUNIT)
diff --git a/java/client/test/org/openqa/selenium/CssValueTest.java b/java/client/test/org/openqa/selenium/CssValueTest.java
index 4225e767718a9..fb62abb47394c 100644
--- a/java/client/test/org/openqa/selenium/CssValueTest.java
+++ b/java/client/test/org/openqa/selenium/CssValueTest.java
@@ -26,11 +26,9 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
public class CssValueTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
@Ignore(value = MARIONETTE, issue = "3795")
public void testShouldPickUpStyleOfAnElement() {
@@ -47,7 +45,6 @@ public void testShouldPickUpStyleOfAnElement() {
assertEquals("rgba(255, 0, 0, 1)", backgroundColour);
}
- @JavascriptEnabled
@Test
@Ignore(value = MARIONETTE, issue = "3795")
public void testGetCssValueShouldReturnStandardizedColour() {
@@ -63,7 +60,6 @@ public void testGetCssValueShouldReturnStandardizedColour() {
}
- @JavascriptEnabled
@Test
public void testShouldAllowInheritedStylesToBeUsed() {
driver.get(pages.javascriptPage);
diff --git a/java/client/test/org/openqa/selenium/ElementAttributeTest.java b/java/client/test/org/openqa/selenium/ElementAttributeTest.java
index b53b639198edf..d1f7fb8e8ff48 100644
--- a/java/client/test/org/openqa/selenium/ElementAttributeTest.java
+++ b/java/client/test/org/openqa/selenium/ElementAttributeTest.java
@@ -37,7 +37,6 @@
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.TestUtilities;
@@ -407,7 +406,6 @@ public void testMultipleAttributeShouldBeTrueWhenSelectHasMultipleWithValueAsSom
assertEquals("true", element.getAttribute("multiple"));
}
- @JavascriptEnabled
@Test
public void testGetAttributeOfUserDefinedProperty() {
driver.get(pages.userDefinedProperty);
diff --git a/java/client/test/org/openqa/selenium/ElementEqualityTest.java b/java/client/test/org/openqa/selenium/ElementEqualityTest.java
index f4ac7110ed34d..7d199ba776bb8 100644
--- a/java/client/test/org/openqa/selenium/ElementEqualityTest.java
+++ b/java/client/test/org/openqa/selenium/ElementEqualityTest.java
@@ -24,7 +24,6 @@
import org.openqa.selenium.internal.WrapsElement;
import org.openqa.selenium.remote.RemoteWebElement;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
import java.util.List;
@@ -68,7 +67,6 @@ public void testSameElementLookedUpDifferentWaysUsingFindElementsShouldHaveSameH
assertEquals(body.get(0).hashCode(), xbody.get(0).hashCode());
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
public void testAnElementFoundInADifferentFrameViaJsShouldHaveSameId() {
diff --git a/java/client/test/org/openqa/selenium/ElementFindingTest.java b/java/client/test/org/openqa/selenium/ElementFindingTest.java
index b6072a1c7b12d..df42d5e8e8b0b 100644
--- a/java/client/test/org/openqa/selenium/ElementFindingTest.java
+++ b/java/client/test/org/openqa/selenium/ElementFindingTest.java
@@ -35,7 +35,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsFreshDriver;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
import org.openqa.selenium.testing.TestUtilities;
@@ -797,7 +796,6 @@ public void testAnElementFoundInADifferentFrameIsStale() {
assertThat(t, instanceOf(StaleElementReferenceException.class));
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
public void testAnElementFoundInADifferentFrameViaJsCanBeUsed() {
diff --git a/java/client/test/org/openqa/selenium/ErrorsTest.java b/java/client/test/org/openqa/selenium/ErrorsTest.java
index 696bb7b38dc44..c15787020043f 100644
--- a/java/client/test/org/openqa/selenium/ErrorsTest.java
+++ b/java/client/test/org/openqa/selenium/ErrorsTest.java
@@ -23,7 +23,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
public class ErrorsTest extends JUnit4TestBase {
@@ -34,7 +33,6 @@ public class ErrorsTest extends JUnit4TestBase {
* This will trivially pass on browsers that do not support the onerror handler (e.g. Internet
* Explorer).
*/
- @JavascriptEnabled
@Test
@Ignore(value = IE, reason = "IE does not support onerror")
public void testShouldNotGenerateErrorsWhenOpeningANewPage() {
diff --git a/java/client/test/org/openqa/selenium/ExecutingAsyncJavascriptTest.java b/java/client/test/org/openqa/selenium/ExecutingAsyncJavascriptTest.java
index 77b6a070e5de8..ea0cf7b29d429 100644
--- a/java/client/test/org/openqa/selenium/ExecutingAsyncJavascriptTest.java
+++ b/java/client/test/org/openqa/selenium/ExecutingAsyncJavascriptTest.java
@@ -42,7 +42,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.NotYetImplemented;
@@ -62,7 +61,6 @@ public void setUp() throws Exception {
driver.manage().timeouts().setScriptTimeout(0, TimeUnit.MILLISECONDS);
}
- @JavascriptEnabled
@Test
public void shouldNotTimeoutIfCallbackInvokedImmediately() {
driver.get(pages.ajaxyPage);
@@ -71,7 +69,6 @@ public void shouldNotTimeoutIfCallbackInvokedImmediately() {
assertEquals(123, ((Number) result).intValue());
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToReturnJavascriptPrimitivesFromAsyncScripts_NeitherNullNorUndefined() {
driver.get(pages.ajaxyPage);
@@ -82,7 +79,6 @@ public void shouldBeAbleToReturnJavascriptPrimitivesFromAsyncScripts_NeitherNull
assertTrue((Boolean) executor.executeAsyncScript("arguments[arguments.length - 1](true);"));
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToReturnJavascriptPrimitivesFromAsyncScripts_NullAndUndefined() {
driver.get(pages.ajaxyPage);
@@ -90,7 +86,6 @@ public void shouldBeAbleToReturnJavascriptPrimitivesFromAsyncScripts_NullAndUnde
assertNull(executor.executeAsyncScript("arguments[arguments.length - 1]()"));
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToReturnAnArrayLiteralFromAnAsyncScript() {
driver.get(pages.ajaxyPage);
@@ -101,7 +96,6 @@ public void shouldBeAbleToReturnAnArrayLiteralFromAnAsyncScript() {
assertTrue(((List>) result).isEmpty());
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToReturnAnArrayObjectFromAnAsyncScript() {
driver.get(pages.ajaxyPage);
@@ -112,7 +106,6 @@ public void shouldBeAbleToReturnAnArrayObjectFromAnAsyncScript() {
assertTrue(((List>) result).isEmpty());
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToReturnArraysOfPrimitivesFromAsyncScripts() {
driver.get(pages.ajaxyPage);
@@ -132,7 +125,6 @@ public void shouldBeAbleToReturnArraysOfPrimitivesFromAsyncScripts() {
assertFalse(results.hasNext());
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToReturnWebElementsFromAsyncScripts() {
driver.get(pages.ajaxyPage);
@@ -142,7 +134,6 @@ public void shouldBeAbleToReturnWebElementsFromAsyncScripts() {
assertEquals("body", ((WebElement) result).getTagName().toLowerCase());
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToReturnArraysOfWebElementsFromAsyncScripts() {
driver.get(pages.ajaxyPage);
@@ -160,7 +151,6 @@ public void shouldBeAbleToReturnArraysOfWebElementsFromAsyncScripts() {
assertEquals(list.get(0), list.get(1));
}
- @JavascriptEnabled
@Test
public void shouldTimeoutIfScriptDoesNotInvokeCallback() {
driver.get(pages.ajaxyPage);
@@ -169,7 +159,6 @@ public void shouldTimeoutIfScriptDoesNotInvokeCallback() {
assertThat(t, instanceOf(ScriptTimeoutException.class));
}
- @JavascriptEnabled
@Test
public void shouldTimeoutIfScriptDoesNotInvokeCallbackWithAZeroTimeout() {
driver.get(pages.ajaxyPage);
@@ -178,7 +167,6 @@ public void shouldTimeoutIfScriptDoesNotInvokeCallbackWithAZeroTimeout() {
assertThat(t, instanceOf(ScriptTimeoutException.class));
}
- @JavascriptEnabled
@Test
public void shouldNotTimeoutIfScriptCallsbackInsideAZeroTimeout() {
driver.get(pages.ajaxyPage);
@@ -187,7 +175,6 @@ public void shouldNotTimeoutIfScriptCallsbackInsideAZeroTimeout() {
"window.setTimeout(function() { callback(123); }, 0)");
}
- @JavascriptEnabled
@Test
public void shouldTimeoutIfScriptDoesNotInvokeCallbackWithLongTimeout() {
driver.manage().timeouts().setScriptTimeout(500, TimeUnit.MILLISECONDS);
@@ -198,7 +185,6 @@ public void shouldTimeoutIfScriptDoesNotInvokeCallbackWithLongTimeout() {
assertThat(t, instanceOf(ScriptTimeoutException.class));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
public void shouldDetectPageLoadsWhileWaitingOnAnAsyncScriptAndReturnAnError() {
@@ -209,7 +195,6 @@ public void shouldDetectPageLoadsWhileWaitingOnAnAsyncScriptAndReturnAnError() {
assertThat(t, instanceOf(WebDriverException.class));
}
- @JavascriptEnabled
@Test
public void shouldCatchErrorsWhenExecutingInitialScript() {
driver.get(pages.ajaxyPage);
@@ -218,7 +203,6 @@ public void shouldCatchErrorsWhenExecutingInitialScript() {
assertThat(t, instanceOf(WebDriverException.class));
}
- @JavascriptEnabled
@Test
public void shouldNotTimeoutWithMultipleCallsTheFirstOneBeingSynchronous() {
driver.get(pages.ajaxyPage);
@@ -228,7 +212,6 @@ public void shouldNotTimeoutWithMultipleCallsTheFirstOneBeingSynchronous() {
"var cb = arguments[arguments.length - 1]; window.setTimeout(function(){cb(true);}, 9);"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -257,7 +240,6 @@ public void shouldCatchErrorsWithMessageAndStacktraceWhenExecutingInitialScript(
assertTrue("Stacktrace has not js method info", seen);
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void shouldBeAbleToExecuteAsynchronousScripts() {
@@ -284,7 +266,6 @@ public void shouldBeAbleToExecuteAsynchronousScripts() {
2, getNumDivElements());
}
- @JavascriptEnabled
@Test
public void shouldBeAbleToPassMultipleArgumentsToAsyncScripts() {
driver.get(pages.ajaxyPage);
@@ -293,7 +274,6 @@ public void shouldBeAbleToPassMultipleArgumentsToAsyncScripts() {
assertEquals(3, result.intValue());
}
- @JavascriptEnabled
@Test
@NeedsLocalEnvironment(reason = "Relies on timing")
public void shouldBeAbleToMakeXMLHttpRequestsAndWaitForTheResponse() {
@@ -327,7 +307,6 @@ public void shouldBeAbleToMakeXMLHttpRequestsAndWaitForTheResponse() {
equalTo("DoneSlept for 2s"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -343,7 +322,6 @@ public void throwsIfScriptTriggersAlert() {
driver.getTitle();
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -358,7 +336,6 @@ public void throwsIfAlertHappensDuringScript() {
driver.getTitle();
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -374,7 +351,6 @@ public void throwsIfScriptTriggersAlertWhichTimesOut() {
driver.getTitle();
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -389,7 +365,6 @@ public void throwsIfAlertHappensDuringScriptWhichTimesOut() {
driver.getTitle();
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
diff --git a/java/client/test/org/openqa/selenium/ExecutingJavascriptTest.java b/java/client/test/org/openqa/selenium/ExecutingJavascriptTest.java
index 2809867b35834..84cf548f1b25c 100644
--- a/java/client/test/org/openqa/selenium/ExecutingJavascriptTest.java
+++ b/java/client/test/org/openqa/selenium/ExecutingJavascriptTest.java
@@ -49,7 +49,6 @@
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.InProject;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsFreshDriver;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.NotYetImplemented;
@@ -78,7 +77,6 @@ private Object executeScript(String script, Object... args) {
return ((JavascriptExecutor) driver).executeScript(script, args);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAString() {
driver.get(pages.xhtmlTestPage);
@@ -89,7 +87,6 @@ public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAString() {
assertEquals("XHTML Test Page", result);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnALong() {
driver.get(pages.nestedPage);
@@ -100,7 +97,6 @@ public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnALong() {
assertTrue((Long) result > 1);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAWebElement() {
driver.get(pages.xhtmlTestPage);
@@ -112,7 +108,6 @@ public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAWebElement() {
assertEquals("a", ((WebElement) result).getTagName().toLowerCase());
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnABoolean() {
driver.get(pages.xhtmlTestPage);
@@ -125,7 +120,6 @@ public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnABoolean() {
}
@SuppressWarnings("unchecked")
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAStringsArray() {
driver.get(pages.javascriptPage);
@@ -140,7 +134,6 @@ public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAStringsArray() {
}
@SuppressWarnings("unchecked")
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAnArray() {
driver.get(pages.javascriptPage);
@@ -159,7 +152,6 @@ public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAnArray() {
@SuppressWarnings("unchecked")
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteJavascriptAndReturnABasicObjectLiteral() {
driver.get(pages.javascriptPage);
@@ -183,7 +175,6 @@ public void testShouldBeAbleToExecuteJavascriptAndReturnABasicObjectLiteral() {
}
@SuppressWarnings("unchecked")
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAnObjectLiteral() {
driver.get(pages.javascriptPage);
@@ -221,7 +212,6 @@ public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAnObjectLiteral()
}
@SuppressWarnings("unchecked")
- @JavascriptEnabled
@Test
@Ignore(IE)
public void testShouldBeAbleToExecuteSimpleJavascriptAndReturnAComplexObject() {
@@ -253,7 +243,6 @@ private static boolean compareLists(List> first, List> second) {
return true;
}
- @JavascriptEnabled
@Test
public void testPassingAndReturningALongShouldReturnAWholeNumber() {
driver.get(pages.javascriptPage);
@@ -264,7 +253,6 @@ public void testPassingAndReturningALongShouldReturnAWholeNumber() {
assertEquals(expectedResult, result);
}
- @JavascriptEnabled
@Test
public void testPassingAndReturningADoubleShouldReturnADecimal() {
driver.get(pages.javascriptPage);
@@ -275,7 +263,6 @@ public void testPassingAndReturningADoubleShouldReturnADecimal() {
assertEquals(expectedResult, result);
}
- @JavascriptEnabled
@Test
public void testShouldThrowAnExceptionWhenTheJavascriptIsBad() {
driver.get(pages.xhtmlTestPage);
@@ -285,7 +272,6 @@ public void testShouldThrowAnExceptionWhenTheJavascriptIsBad() {
assertThat(t.getMessage(), not(startsWith("null ")));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -316,7 +302,6 @@ public void testShouldThrowAnExceptionWithMessageAndStacktraceWhenTheJavascriptI
assertTrue("Stacktrace has not js method info", seen);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToCallFunctionsDefinedOnThePage() {
driver.get(pages.javascriptPage);
@@ -326,7 +311,6 @@ public void testShouldBeAbleToCallFunctionsDefinedOnThePage() {
assertEquals("I like cheese", text.trim());
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToPassAStringAnAsArgument() {
driver.get(pages.javascriptPage);
@@ -336,7 +320,6 @@ public void testShouldBeAbleToPassAStringAnAsArgument() {
assertEquals("fish", value);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToPassABooleanAsArgument() {
driver.get(pages.javascriptPage);
@@ -345,7 +328,6 @@ public void testShouldBeAbleToPassABooleanAsArgument() {
assertTrue(value);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToPassANumberAnAsArgument() {
driver.get(pages.javascriptPage);
@@ -354,7 +336,6 @@ public void testShouldBeAbleToPassANumberAnAsArgument() {
assertTrue(value);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToPassAWebElementAsArgument() {
driver.get(pages.javascriptPage);
@@ -367,7 +348,6 @@ public void testShouldBeAbleToPassAWebElementAsArgument() {
assertEquals("plainButton", value);
}
- @JavascriptEnabled
@Test
public void testPassingArrayAsOnlyArgumentFlattensArray() {
driver.get(pages.javascriptPage);
@@ -376,7 +356,6 @@ public void testPassingArrayAsOnlyArgumentFlattensArray() {
assertEquals(array[0], value);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToPassAnArrayAsAdditionalArgument() {
driver.get(pages.javascriptPage);
@@ -385,7 +364,6 @@ public void testShouldBeAbleToPassAnArrayAsAdditionalArgument() {
assertEquals(array.length, length);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToPassACollectionAsArgument() {
driver.get(pages.javascriptPage);
@@ -405,7 +383,6 @@ public void testShouldBeAbleToPassACollectionAsArgument() {
assertEquals(collection.size(), length);
}
- @JavascriptEnabled
@Test
public void testShouldThrowAnExceptionIfAnArgumentIsNotValid() {
driver.get(pages.javascriptPage);
@@ -413,7 +390,6 @@ public void testShouldThrowAnExceptionIfAnArgumentIsNotValid() {
assertThat(t, instanceOf(IllegalArgumentException.class));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToPassInMoreThanOneArgument() {
driver.get(pages.javascriptPage);
@@ -422,7 +398,6 @@ public void testShouldBeAbleToPassInMoreThanOneArgument() {
assertEquals("onetwo", result);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToGrabTheBodyOfFrameOnceSwitchedTo() {
driver.get(pages.richTextPage);
@@ -436,7 +411,6 @@ public void testShouldBeAbleToGrabTheBodyOfFrameOnceSwitchedTo() {
}
@SuppressWarnings("unchecked")
- @JavascriptEnabled
@Test
public void testShouldBeAbleToReturnAnArrayOfWebElements() {
driver.get(pages.formPage);
@@ -447,7 +421,6 @@ public void testShouldBeAbleToReturnAnArrayOfWebElements() {
assertFalse(items.isEmpty());
}
- @JavascriptEnabled
@Test
public void testJavascriptStringHandlingShouldWorkAsExpected() {
driver.get(pages.javascriptPage);
@@ -462,7 +435,6 @@ public void testJavascriptStringHandlingShouldWorkAsExpected() {
assertEquals(" ", value);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteABigChunkOfJavascriptCode() throws IOException {
driver.get(pages.javascriptPage);
@@ -475,7 +447,6 @@ public void testShouldBeAbleToExecuteABigChunkOfJavascriptCode() throws IOExcept
}
@SuppressWarnings("unchecked")
- @JavascriptEnabled
@Test
public void testShouldBeAbleToExecuteScriptAndReturnElementsList() {
driver.get(pages.formPage);
@@ -486,7 +457,6 @@ public void testShouldBeAbleToExecuteScriptAndReturnElementsList() {
assertFalse(resultsList.isEmpty());
}
- @JavascriptEnabled
@NeedsFreshDriver
@NoDriverAfterTest
@Test
@@ -497,7 +467,6 @@ public void testShouldThrowExceptionIfExecutingOnNoPage() {
assertThat(t, instanceOf(WebDriverException.class));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToCreateAPersistentValue() {
driver.get(pages.formPage);
@@ -509,7 +478,6 @@ public void testShouldBeAbleToCreateAPersistentValue() {
assertEquals("hello world", text);
}
- @JavascriptEnabled
@Test
public void testCanHandleAnArrayOfElementsAsAnObjectArray() {
driver.get(pages.formPage);
@@ -523,7 +491,6 @@ public void testCanHandleAnArrayOfElementsAsAnObjectArray() {
assertEquals("form", name.toLowerCase());
}
- @JavascriptEnabled
@Test
public void testCanPassAMapAsAParameter() {
driver.get(pages.simpleTestPage);
@@ -536,7 +503,6 @@ public void testCanPassAMapAsAParameter() {
assertEquals(2, ((Number) res).intValue());
}
- @JavascriptEnabled
@Test
public void testShouldThrowAnExceptionWhenArgumentsWithStaleElementPassed() {
driver.get(pages.simpleTestPage);
@@ -555,7 +521,6 @@ public void testShouldThrowAnExceptionWhenArgumentsWithStaleElementPassed() {
assertThat(t, instanceOf(StaleElementReferenceException.class));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -574,7 +539,6 @@ public void testShouldBeAbleToReturnADateObject() {
}
}
- @JavascriptEnabled
@Test(timeout = 10000)
@Ignore(CHROME)
@Ignore(IE)
diff --git a/java/client/test/org/openqa/selenium/FormHandlingTest.java b/java/client/test/org/openqa/selenium/FormHandlingTest.java
index e02888bc26bb1..c981a48eba933 100644
--- a/java/client/test/org/openqa/selenium/FormHandlingTest.java
+++ b/java/client/test/org/openqa/selenium/FormHandlingTest.java
@@ -39,7 +39,6 @@
import org.openqa.selenium.environment.webserver.Page;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.TestUtilities;
@@ -269,7 +268,6 @@ public void testEmptyTextBoxesShouldReturnAnEmptyStringNotNull() {
assertEquals(emptyTextBox.getAttribute("value"), "");
}
- @JavascriptEnabled
@Test
@Ignore(PHANTOMJS)
@Ignore(SAFARI)
diff --git a/java/client/test/org/openqa/selenium/FrameSwitchingTest.java b/java/client/test/org/openqa/selenium/FrameSwitchingTest.java
index 75ae2e7dcd952..480638d7a7c57 100644
--- a/java/client/test/org/openqa/selenium/FrameSwitchingTest.java
+++ b/java/client/test/org/openqa/selenium/FrameSwitchingTest.java
@@ -41,7 +41,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.NotYetImplemented;
@@ -354,7 +353,6 @@ public void testShouldBeAbleToClickInAFrame() {
assertThat(getTextOfGreetingElement(), equalTo("Success!"));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToClickInAFrameThatRewritesTopWindowLocation() {
driver.get(appServer.whereIs("click_tests/issue5237.html"));
@@ -416,7 +414,6 @@ public void testGetCurrentUrlReturnsTopLevelBrowsingContextUrlForIframes() {
assertThat(driver.getCurrentUrl(), equalTo(pages.iframePage));
}
- @JavascriptEnabled
@Test
@Ignore(PHANTOMJS)
public void testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUs() {
@@ -439,7 +436,6 @@ public void testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUs() {
wait.until(presenceOfElementLocated(By.id("success")));
}
- @JavascriptEnabled
@Test
@Ignore(PHANTOMJS)
public void testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUsWithFrameIndex() {
@@ -459,7 +455,6 @@ public void testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUsWithFr
wait.until(presenceOfElementLocated(By.id("success")));
}
- @JavascriptEnabled
@Test
@Ignore(PHANTOMJS)
public void testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUsWithWebelement() {
@@ -480,7 +475,6 @@ public void testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromUnderUsWithWe
wait.until(presenceOfElementLocated(By.id("success")));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -505,7 +499,6 @@ public void testShouldReturnWindowTitleInAFrameset() {
assertEquals("Unique title", driver.getTitle());
}
- @JavascriptEnabled
@Test
public void testJavaScriptShouldExecuteInTheContextOfTheCurrentFrame() {
JavascriptExecutor executor = (JavascriptExecutor) driver;
@@ -516,7 +509,6 @@ public void testJavaScriptShouldExecuteInTheContextOfTheCurrentFrame() {
assertTrue((Boolean) executor.executeScript("return window != window.top"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldNotSwitchMagicallyToTheTopWindow() {
diff --git a/java/client/test/org/openqa/selenium/ImplicitWaitTest.java b/java/client/test/org/openqa/selenium/ImplicitWaitTest.java
index 00a65fea8e7f8..d5b7b5179d197 100644
--- a/java/client/test/org/openqa/selenium/ImplicitWaitTest.java
+++ b/java/client/test/org/openqa/selenium/ImplicitWaitTest.java
@@ -37,7 +37,6 @@
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import java.util.List;
@@ -56,7 +55,6 @@ public void tearDown() throws Exception {
driver.manage().timeouts().implicitlyWait(0, MILLISECONDS);
}
- @JavascriptEnabled
@Test
public void testShouldImplicitlyWaitForASingleElement() {
driver.get(pages.dynamicPage);
@@ -68,7 +66,6 @@ public void testShouldImplicitlyWaitForASingleElement() {
driver.findElement(By.id("box0")); // All is well if this doesn't throw.
}
- @JavascriptEnabled
@Test
public void testShouldStillFailToFindAnElementWhenImplicitWaitsAreEnabled() {
driver.get(pages.dynamicPage);
@@ -77,7 +74,6 @@ public void testShouldStillFailToFindAnElementWhenImplicitWaitsAreEnabled() {
assertThat(t, instanceOf(NoSuchElementException.class));
}
- @JavascriptEnabled
@Test
public void testShouldReturnAfterFirstAttemptToFindOneAfterDisablingImplicitWaits() {
driver.get(pages.dynamicPage);
@@ -87,7 +83,6 @@ public void testShouldReturnAfterFirstAttemptToFindOneAfterDisablingImplicitWait
assertThat(t, instanceOf(NoSuchElementException.class));
}
- @JavascriptEnabled
@Test
public void testShouldImplicitlyWaitUntilAtLeastOneElementIsFoundWhenSearchingForMany() {
driver.get(pages.dynamicPage);
@@ -101,7 +96,6 @@ public void testShouldImplicitlyWaitUntilAtLeastOneElementIsFoundWhenSearchingFo
assertFalse(elements.isEmpty());
}
- @JavascriptEnabled
@Test
public void testShouldStillFailToFindElementsWhenImplicitWaitsAreEnabled() {
driver.get(pages.dynamicPage);
@@ -110,7 +104,6 @@ public void testShouldStillFailToFindElementsWhenImplicitWaitsAreEnabled() {
assertTrue(elements.isEmpty());
}
- @JavascriptEnabled
@Test
public void testShouldStillFailToFindElementsByIdWhenImplicitWaitsAreEnabled() {
driver.get(pages.dynamicPage);
@@ -119,7 +112,6 @@ public void testShouldStillFailToFindElementsByIdWhenImplicitWaitsAreEnabled() {
assertTrue(elements.toString(), elements.isEmpty());
}
- @JavascriptEnabled
@Test
public void testShouldReturnAfterFirstAttemptToFindManyAfterDisablingImplicitWaits() {
driver.get(pages.dynamicPage);
@@ -133,7 +125,6 @@ public void testShouldReturnAfterFirstAttemptToFindManyAfterDisablingImplicitWai
assertTrue(elements.isEmpty());
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
@@ -151,8 +142,6 @@ public void testShouldImplicitlyWaitForAnElementToBeVisibleBeforeInteracting() {
revealed.sendKeys("hello world");
}
-
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(PHANTOMJS)
diff --git a/java/client/test/org/openqa/selenium/JavascriptEnabledDriverTest.java b/java/client/test/org/openqa/selenium/JavascriptEnabledDriverTest.java
index 38bc13a9bf233..d3635eec9b19b 100644
--- a/java/client/test/org/openqa/selenium/JavascriptEnabledDriverTest.java
+++ b/java/client/test/org/openqa/selenium/JavascriptEnabledDriverTest.java
@@ -38,7 +38,6 @@
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsFreshDriver;
import org.openqa.selenium.testing.NotYetImplemented;
@@ -47,7 +46,6 @@
*/
public class JavascriptEnabledDriverTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
public void testDocumentShouldReflectLatestTitle() throws Exception {
driver.get(pages.javascriptPage);
@@ -58,7 +56,6 @@ public void testDocumentShouldReflectLatestTitle() throws Exception {
assertThat(driver.getTitle(), equalTo("Changed"));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testDocumentShouldReflectLatestDom() throws Exception {
@@ -75,7 +72,6 @@ public void testDocumentShouldReflectLatestDom() throws Exception {
assertThat(dynamo.getText(), equalTo("Fish and chips!"));
}
- @JavascriptEnabled
@Test
public void testShouldWaitForLoadsToCompleteAfterJavascriptCausesANewPageToLoad() {
driver.get(pages.formPage);
@@ -86,7 +82,6 @@ public void testShouldWaitForLoadsToCompleteAfterJavascriptCausesANewPageToLoad(
assertThat(driver.getTitle(), equalTo("Page3"));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToFindElementAfterJavascriptCausesANewPageToLoad() {
driver.get(pages.formPage);
@@ -97,7 +92,6 @@ public void testShouldBeAbleToFindElementAfterJavascriptCausesANewPageToLoad() {
assertThat(driver.findElement(By.id("pageNumber")).getText(), equalTo("3"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldFireOnChangeEventWhenSettingAnElementsValue() {
@@ -108,7 +102,6 @@ public void testShouldFireOnChangeEventWhenSettingAnElementsValue() {
assertThat(result, equalTo("change"));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToSubmitFormsByCausingTheOnClickEventToFire() {
driver.get(pages.javascriptPage);
@@ -124,7 +117,6 @@ private void waitForTitleChange(String newTitle) {
wait.until(titleIs(newTitle));
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToClickOnSubmitButtons() {
driver.get(pages.javascriptPage);
@@ -136,7 +128,6 @@ public void testShouldBeAbleToClickOnSubmitButtons() {
assertThat(driver.getTitle(), is("We Arrive Here"));
}
- @JavascriptEnabled
@Test
public void testIssue80ClickShouldGenerateClickEvent() {
driver.get(pages.javascriptPage);
@@ -150,7 +141,6 @@ public void testIssue80ClickShouldGenerateClickEvent() {
assertEquals("Clicked", elementValue);
}
- @JavascriptEnabled
@Test
public void testShouldBeAbleToSwitchToFocusedElement() {
driver.get(pages.javascriptPage);
@@ -161,7 +151,6 @@ public void testShouldBeAbleToSwitchToFocusedElement() {
assertThat(element.getAttribute("id"), is("theworks"));
}
- @JavascriptEnabled
@Test
public void testIfNoElementHasFocusTheActiveElementIsTheBody() {
driver.get(pages.simpleTestPage);
@@ -171,7 +160,6 @@ public void testIfNoElementHasFocusTheActiveElementIsTheBody() {
assertThat(element.getAttribute("name"), is("body"));
}
- @JavascriptEnabled
@Test
@Ignore(value = SAFARI, reason = "issue 4061")
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -198,7 +186,6 @@ public void testChangeEventIsFiredAppropriatelyWhenFocusIsLost() {
/**
* If the click handler throws an exception, the firefox driver freezes. This is suboptimal.
*/
- @JavascriptEnabled
@Test
public void testShouldBeAbleToClickIfEvenSomethingHorribleHappens() {
driver.get(pages.javascriptPage);
@@ -239,7 +226,6 @@ public void testShouldBeAbleToGetTheLocationOfAnElement() {
* running: "ImplicitWaitTest", "TemporaryFilesystemTest", "JavascriptEnabledDriverTest".
* SimonStewart 2010-10-04
*/
- @JavascriptEnabled
@NeedsFreshDriver
@Test
@Ignore(value = SAFARI, reason = "issue 3693")
diff --git a/java/client/test/org/openqa/selenium/MiscTest.java b/java/client/test/org/openqa/selenium/MiscTest.java
index 8148a3f84aee7..f339bb0d6fe59 100644
--- a/java/client/test/org/openqa/selenium/MiscTest.java
+++ b/java/client/test/org/openqa/selenium/MiscTest.java
@@ -30,7 +30,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
public class MiscTest extends JUnit4TestBase {
@@ -59,7 +58,6 @@ public void shouldReturnTagName() {
assertThat(selectBox.getTagName().toLowerCase(), is("input"));
}
- @JavascriptEnabled
@Test
public void testShouldReturnTheSourceOfAPage() {
driver.get(pages.simpleTestPage);
@@ -74,7 +72,6 @@ public void testShouldReturnTheSourceOfAPage() {
assertThat(source.contains("with document.write and with document.write again"), is(true));
}
- @JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "returns XML content formatted for display as HTML document")
@Ignore(value = SAFARI, reason = "returns XML content formatted for display as HTML document")
@@ -99,7 +96,6 @@ public void testStimulatesStrangeOnloadInteractionInFirefox()
driver.findElement(By.id("links"));
}
- @JavascriptEnabled
@Test
public void testClickingShouldNotTrampleWOrHInGlobalScope() throws Throwable {
driver.get(appServer.whereIs("globalscope.html"));
diff --git a/java/client/test/org/openqa/selenium/PageLoadingTest.java b/java/client/test/org/openqa/selenium/PageLoadingTest.java
index 8a79fb4b52930..f5de14ec7f83b 100644
--- a/java/client/test/org/openqa/selenium/PageLoadingTest.java
+++ b/java/client/test/org/openqa/selenium/PageLoadingTest.java
@@ -57,7 +57,6 @@
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsFreshDriver;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.NoDriverAfterTest;
@@ -286,7 +285,6 @@ public void testShouldBeAbleToLoadAPageWithFramesetsAndWaitUntilAllFramesAreLoad
assertThat(pageNumber.getText().trim(), equalTo("2"));
}
- @JavascriptEnabled
@NeedsFreshDriver
@NoDriverAfterTest
@Test
@@ -404,7 +402,6 @@ public void testShouldBeAbleToRefreshAPage() {
* @see Issue 2282
*/
@NoDriverAfterTest
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
diff --git a/java/client/test/org/openqa/selenium/PositionAndSizeTest.java b/java/client/test/org/openqa/selenium/PositionAndSizeTest.java
index 42730464e8e56..fa533e37fa62f 100644
--- a/java/client/test/org/openqa/selenium/PositionAndSizeTest.java
+++ b/java/client/test/org/openqa/selenium/PositionAndSizeTest.java
@@ -38,7 +38,6 @@
import org.openqa.selenium.internal.Locatable;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
import org.openqa.selenium.testing.TestUtilities;
@@ -158,7 +157,6 @@ public void testShouldGetCoordinatesOfAnElementWithFixedPosition() {
assertThat(getLocationOnPage(By.id("fixed")).getY(), greaterThan(0));
}
- @JavascriptEnabled
@Test
public void testShouldCorrectlyIdentifyThatAnElementHasWidthAndHeight() {
driver.get(pages.xhtmlTestPage);
@@ -172,7 +170,6 @@ public void testShouldCorrectlyIdentifyThatAnElementHasWidthAndHeight() {
// TODO: This test's value seems dubious at best. The CSS spec does not define how browsers
// should handle sub-pixel rendering, and every browser seems to be different anyhow:
// http://ejohn.org/blog/sub-pixel-problems-in-css/
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(value = CHROME, reason = "WebKit bug 28804")
diff --git a/java/client/test/org/openqa/selenium/ReferrerTest.java b/java/client/test/org/openqa/selenium/ReferrerTest.java
index 1ab22b93c2e4b..8c635866ef2ad 100644
--- a/java/client/test/org/openqa/selenium/ReferrerTest.java
+++ b/java/client/test/org/openqa/selenium/ReferrerTest.java
@@ -48,7 +48,6 @@
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.drivers.WebDriverBuilder;
import org.seleniumhq.jetty9.server.Handler;
@@ -118,7 +117,6 @@ public static void readPages() throws IOException {
* Tests navigation when all of the files are hosted on the same domain and the browser
* does not have a proxy configured.
*/
- @JavascriptEnabled
@Test
@NeedsLocalEnvironment
public void basicHistoryNavigationWithoutAProxy() {
@@ -141,7 +139,6 @@ public void basicHistoryNavigationWithoutAProxy() {
/**
* Tests navigation across multiple domains when the browser does not have a proxy configured.
*/
- @JavascriptEnabled
@Test
@NeedsLocalEnvironment
public void crossDomainHistoryNavigationWithoutAProxy() {
@@ -172,7 +169,6 @@ public void crossDomainHistoryNavigationWithoutAProxy() {
* Tests navigation when all of the files are hosted on the same domain and the browser is
* configured to use a proxy that permits direct access to that domain.
*/
- @JavascriptEnabled
@Test
@NeedsLocalEnvironment
public void basicHistoryNavigationWithADirectProxy() {
@@ -201,7 +197,6 @@ public void basicHistoryNavigationWithADirectProxy() {
* Tests navigation across multiple domains when the browser is configured to use a proxy that
* permits direct access to those domains.
*/
- @JavascriptEnabled
@Test
@NeedsLocalEnvironment
public void crossDomainHistoryNavigationWithADirectProxy() {
@@ -236,7 +231,6 @@ public void crossDomainHistoryNavigationWithADirectProxy() {
* Tests navigation across multiple domains when the browser is configured to use a proxy that
* redirects the second domain to another host.
*/
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@NeedsLocalEnvironment
@@ -277,7 +271,6 @@ public void crossDomainHistoryNavigationWithAProxiedHost() {
* intercepts requests to a specific host (www.example.com) - all other requests are permitted
* to connect directly to the target server.
*/
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@NeedsLocalEnvironment
@@ -315,7 +308,6 @@ public void crossDomainHistoryNavigationWhenProxyInterceptsHostRequests() {
* Tests navigation on a single domain where the browser is configured to use a proxy that
* intercepts requests for page 2.
*/
- @JavascriptEnabled
@Test
@Ignore(value = IE,
reason = "IEDriver does not disable automatic proxy caching, causing this test to fail, issue 6629")
diff --git a/java/client/test/org/openqa/selenium/StaleElementReferenceTest.java b/java/client/test/org/openqa/selenium/StaleElementReferenceTest.java
index 015d5877769c8..dc65a8b6d314b 100644
--- a/java/client/test/org/openqa/selenium/StaleElementReferenceTest.java
+++ b/java/client/test/org/openqa/selenium/StaleElementReferenceTest.java
@@ -25,7 +25,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
public class StaleElementReferenceTest extends JUnit4TestBase {
@@ -38,7 +37,6 @@ public void testOldPage() {
assertThat(t, instanceOf(StaleElementReferenceException.class));
}
- @JavascriptEnabled
@Test
public void testShouldNotCrashWhenCallingGetSizeOnAnObsoleteElement() {
driver.get(pages.simpleTestPage);
@@ -48,7 +46,6 @@ public void testShouldNotCrashWhenCallingGetSizeOnAnObsoleteElement() {
assertThat(t, instanceOf(StaleElementReferenceException.class));
}
- @JavascriptEnabled
@Test
public void testShouldNotCrashWhenQueryingTheAttributeOfAStaleElement() {
driver.get(pages.xhtmlTestPage);
@@ -58,7 +55,6 @@ public void testShouldNotCrashWhenQueryingTheAttributeOfAStaleElement() {
assertThat(t, instanceOf(StaleElementReferenceException.class));
}
- @JavascriptEnabled
@Test
public void testRemovingAnElementDynamicallyFromTheDomShouldCauseAStaleRefException() {
driver.get(pages.javascriptPage);
diff --git a/java/client/test/org/openqa/selenium/TextHandlingTest.java b/java/client/test/org/openqa/selenium/TextHandlingTest.java
index 13a6f1f429bda..4bf98747dae36 100644
--- a/java/client/test/org/openqa/selenium/TextHandlingTest.java
+++ b/java/client/test/org/openqa/selenium/TextHandlingTest.java
@@ -40,7 +40,6 @@
import org.openqa.selenium.environment.webserver.Page;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.TestUtilities;
@@ -314,7 +313,6 @@ public void describeTo(Description description) {
};
}
- @JavascriptEnabled
@Test
public void testShouldOnlyIncludeVisibleText() {
driver.get(pages.javascriptPage);
@@ -362,7 +360,6 @@ public void testTextOfATextAreaShouldBeEqualToItsDefaultTextEvenAfterTyping() {
assertEquals(oldText, area.getText());
}
- @JavascriptEnabled
@Test
@Ignore(IE)
public void testTextOfATextAreaShouldBeEqualToItsDefaultTextEvenAfterChangingTheValue() {
diff --git a/java/client/test/org/openqa/selenium/TypingTest.java b/java/client/test/org/openqa/selenium/TypingTest.java
index 138c32cd40c0f..e7a804c54533f 100644
--- a/java/client/test/org/openqa/selenium/TypingTest.java
+++ b/java/client/test/org/openqa/selenium/TypingTest.java
@@ -38,13 +38,11 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.drivers.Browser;
public class TypingTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldFireKeyPressEvents() {
@@ -57,7 +55,6 @@ public void testShouldFireKeyPressEvents() {
assertThat(result.getText(), containsString("press:"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldFireKeyDownEvents() {
@@ -70,7 +67,6 @@ public void testShouldFireKeyDownEvents() {
assertThat(result.getText(), containsString("down:"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldFireKeyUpEvents() {
@@ -144,7 +140,6 @@ public void testShouldBeAbleToMixUpperAndLowerCaseLetters() {
assertThat(keyReporter.getAttribute("value"), is("me@eXample.com"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testArrowKeysShouldNotBePrintable() {
@@ -167,7 +162,6 @@ public void testShouldBeAbleToUseArrowKeys() {
assertThat(keyReporter.getAttribute("value"), is("test"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testWillSimulateAKeyUpWhenEnteringTextIntoInputElements() {
@@ -180,7 +174,6 @@ public void testWillSimulateAKeyUpWhenEnteringTextIntoInputElements() {
assertThat(result.getText(), equalTo("I like cheese"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testWillSimulateAKeyDownWhenEnteringTextIntoInputElements() {
@@ -195,7 +188,6 @@ public void testWillSimulateAKeyDownWhenEnteringTextIntoInputElements() {
assertThat(result.getText(), equalTo("I like chees"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testWillSimulateAKeyPressWhenEnteringTextIntoInputElements() {
@@ -210,7 +202,6 @@ public void testWillSimulateAKeyPressWhenEnteringTextIntoInputElements() {
assertThat(result.getText(), equalTo("I like chees"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testWillSimulateAKeyUpWhenEnteringTextIntoTextAreas() {
@@ -223,7 +214,6 @@ public void testWillSimulateAKeyUpWhenEnteringTextIntoTextAreas() {
assertThat(result.getText(), equalTo("I like cheese"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testWillSimulateAKeyDownWhenEnteringTextIntoTextAreas() {
@@ -238,7 +228,6 @@ public void testWillSimulateAKeyDownWhenEnteringTextIntoTextAreas() {
assertThat(result.getText(), equalTo("I like chees"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testWillSimulateAKeyPressWhenEnteringTextIntoTextAreas() {
@@ -253,7 +242,6 @@ public void testWillSimulateAKeyPressWhenEnteringTextIntoTextAreas() {
assertThat(result.getText(), equalTo("I like chees"));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -273,7 +261,6 @@ private static void checkRecordedKeySequence(WebElement element, int expectedKey
is(String.format("down: %1$d up: %1$d", expectedKeyCode))));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(PHANTOMJS)
@@ -303,7 +290,6 @@ public void testShouldReportKeyCodeOfArrowKeys() {
assertThat(element.getAttribute("value"), is(""));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldReportKeyCodeOfArrowKeysUpDownEvents() {
@@ -335,7 +321,6 @@ public void testShouldReportKeyCodeOfArrowKeysUpDownEvents() {
assertThat(element.getAttribute("value"), is(""));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testNumericNonShiftKeys() {
@@ -349,7 +334,6 @@ public void testNumericNonShiftKeys() {
assertThat(element.getAttribute("value"), is(numericLineCharsNonShifted));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testNumericShiftKeys() {
@@ -365,7 +349,6 @@ public void testNumericShiftKeys() {
assertThat(result.getText().trim(), containsString(" up: 16"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testLowerCaseAlphaKeys() {
@@ -379,7 +362,6 @@ public void testLowerCaseAlphaKeys() {
assertThat(element.getAttribute("value"), is(lowerAlphas));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testUppercaseAlphaKeys() {
@@ -395,7 +377,6 @@ public void testUppercaseAlphaKeys() {
assertThat(result.getText().trim(), containsString(" up: 16"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testAllPrintableKeys() {
@@ -425,7 +406,6 @@ public void testArrowKeysAndPageUpAndDown() {
assertThat(element.getAttribute("value"), is("ba1"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testHomeAndEndAndPageUpAndPageDownKeys() {
@@ -442,7 +422,6 @@ public void testHomeAndEndAndPageUpAndPageDownKeys() {
assertThat(element.getAttribute("value"), is("0000abc1111"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testDeleteAndBackspaceKeys() {
@@ -460,7 +439,6 @@ public void testDeleteAndBackspaceKeys() {
assertThat(element.getAttribute("value"), is("abcdfgi"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testSpecialSpaceKeys() {
@@ -472,7 +450,6 @@ public void testSpecialSpaceKeys() {
assertThat(element.getAttribute("value"), is("abcd fgh ij"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testNumberpadKeys() {
@@ -487,7 +464,6 @@ public void testNumberpadKeys() {
assertThat(element.getAttribute("value"), is("abcd*-+.,09+;=/3abcd"));
}
- @JavascriptEnabled
@Test
@Ignore(value = IE, reason = "F4 triggers address bar")
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -501,7 +477,6 @@ public void testFunctionKeys() {
assertThat(element.getAttribute("value"), is("FUNCTION-KEYS-TOO"));
}
- @JavascriptEnabled
@Test
@Ignore(value = SAFARI, reason = "issue 4221")
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -518,7 +493,6 @@ public void testShiftSelectionDeletes() {
assertThat(element.getAttribute("value"), is("abcd e"));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -541,7 +515,6 @@ public void testChordControlHomeShiftEndDelete() {
assertThat(element.getAttribute("value"), is(""));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testChordReveseShiftHomeSelectionDeletes() {
@@ -574,7 +547,6 @@ public void testChordReveseShiftHomeSelectionDeletes() {
// control-x control-v here for cut & paste tests, these work on windows
// and linux, but not on the MAC.
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testChordControlCutAndPaste() {
@@ -622,7 +594,6 @@ public void testChordControlCutAndPaste() {
assertThat(element.getAttribute("value"), is(""));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldTypeIntoInputElementsThatHaveNoTypeAttribute() {
@@ -634,7 +605,6 @@ public void testShouldTypeIntoInputElementsThatHaveNoTypeAttribute() {
assertThat(element.getAttribute("value"), is("should say cheese"));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldNotTypeIntoElementsThatPreventKeyDownEvents() {
@@ -646,7 +616,6 @@ public void testShouldNotTypeIntoElementsThatPreventKeyDownEvents() {
assertThat(silent.getAttribute("value"), is(""));
}
- @JavascriptEnabled
@Test
@Ignore(PHANTOMJS)
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
@@ -661,7 +630,6 @@ public void testGenerateKeyPressEventEvenWhenElementPreventsDefault() {
assertThat(result.getText().trim(), is(""));
}
- @JavascriptEnabled
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
public void testShouldBeAbleToTypeOnAnEmailInputField() {
@@ -680,7 +648,6 @@ public void testShouldBeAbleToTypeOnANumberInputField() {
assertThat(email.getAttribute("value"), equalTo("33"));
}
- @JavascriptEnabled
@Test
@Ignore(SAFARI)
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
diff --git a/java/client/test/org/openqa/selenium/UnexpectedAlertBehaviorTest.java b/java/client/test/org/openqa/selenium/UnexpectedAlertBehaviorTest.java
index 8516939b5a876..9d42346159c00 100644
--- a/java/client/test/org/openqa/selenium/UnexpectedAlertBehaviorTest.java
+++ b/java/client/test/org/openqa/selenium/UnexpectedAlertBehaviorTest.java
@@ -36,7 +36,6 @@
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.TestUtilities;
import org.openqa.selenium.testing.drivers.WebDriverBuilder;
@@ -57,27 +56,23 @@ public void quitDriver() throws Exception {
}
}
- @JavascriptEnabled
@Test
public void canAcceptUnhandledAlert() {
runScenarioWithUnhandledAlert(UnexpectedAlertBehaviour.ACCEPT, "This is a default value");
}
- @JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Unstable Chrome behavior")
public void canDismissUnhandledAlert() {
runScenarioWithUnhandledAlert(UnexpectedAlertBehaviour.DISMISS, "null");
}
- @JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Chrome uses IGNORE mode by default")
public void dismissUnhandledAlertsByDefault() {
runScenarioWithUnhandledAlert(null, "null");
}
- @JavascriptEnabled
@Test
@Ignore(value = CHROME, reason = "Unstable Chrome behavior")
public void canIgnoreUnhandledAlert() {
@@ -87,7 +82,6 @@ public void canIgnoreUnhandledAlert() {
driver2.switchTo().alert().dismiss();
}
- @JavascriptEnabled
@Test
public void canSpecifyUnhandledAlertBehaviourUsingCapabilities() {
desiredCaps.setCapability(UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);
@@ -96,7 +90,6 @@ public void canSpecifyUnhandledAlertBehaviourUsingCapabilities() {
runScenarioWithUnhandledAlert("This is a default value");
}
- @JavascriptEnabled
@Test
@Ignore(value = IE, reason = "required capabilities not implemented")
@Ignore(value = CHROME, reason = "required capabilities not implemented")
diff --git a/java/client/test/org/openqa/selenium/UploadTest.java b/java/client/test/org/openqa/selenium/UploadTest.java
index 9b9ed7e4326e4..8b0d198694b31 100644
--- a/java/client/test/org/openqa/selenium/UploadTest.java
+++ b/java/client/test/org/openqa/selenium/UploadTest.java
@@ -35,7 +35,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
import org.openqa.selenium.testing.TestUtilities;
@@ -59,7 +58,6 @@ public void setUp() throws Exception {
testFile = createTmpFile(FILE_HTML);
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/594")
diff --git a/java/client/test/org/openqa/selenium/VisibilityTest.java b/java/client/test/org/openqa/selenium/VisibilityTest.java
index 4a761a6788921..4e89fcf387f03 100644
--- a/java/client/test/org/openqa/selenium/VisibilityTest.java
+++ b/java/client/test/org/openqa/selenium/VisibilityTest.java
@@ -38,7 +38,6 @@
import org.junit.Test;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.TestUtilities;
@@ -76,7 +75,6 @@ public void testShouldCountElementsAsVisibleIfStylePropertyHasBeenSet() {
assertTrue(shown.isDisplayed());
}
- @JavascriptEnabled
@Test
public void testShouldModifyTheVisibilityOfAnElementDynamically() {
driver.get(pages.javascriptPage);
@@ -122,7 +120,6 @@ public void testShouldNotBeAbleToTypeToAnElementThatIsNotDisplayed() {
assertThat(element.getAttribute("value"), is(not("You don't see me")));
}
- @JavascriptEnabled // element.getSize() requires Javascript in HtmlUnit
@Test
@Ignore(IE)
public void testZeroSizedDivIsShownIfDescendantHasSize() {
@@ -282,7 +279,6 @@ public void testShouldShowElementNotVisibleWhenParentElementHasHiddenAttribute()
* @see
* http://code.google.com/p/selenium/issues/detail?id=1610
*/
- @JavascriptEnabled // element.getCssValue() requires Javascript in HtmlUnit
@Test
@Ignore(IE)
public void testShouldBeAbleToClickOnElementsWithOpacityZero() {
diff --git a/java/client/test/org/openqa/selenium/WindowSwitchingTest.java b/java/client/test/org/openqa/selenium/WindowSwitchingTest.java
index d093466a888d3..6f056cf861605 100644
--- a/java/client/test/org/openqa/selenium/WindowSwitchingTest.java
+++ b/java/client/test/org/openqa/selenium/WindowSwitchingTest.java
@@ -40,7 +40,6 @@
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
import org.openqa.selenium.testing.TestUtilities;
@@ -188,7 +187,6 @@ public void testShouldBeAbleToIterateOverAllOpenWindows() {
assertEquals(3, allWindowTitles.size());
}
- @JavascriptEnabled
@Test
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/611")
public void testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang()
@@ -222,7 +220,6 @@ public void testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToH
// If we make it this far, we're all good.
}
- @JavascriptEnabled
@Test
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/611")
public void testCanCallGetWindowHandlesAfterClosingAWindow() throws Exception {
diff --git a/java/client/test/org/openqa/selenium/htmlunit/BUCK b/java/client/test/org/openqa/selenium/htmlunit/BUCK
index 9b78b02612359..04c69528ae41d 100644
--- a/java/client/test/org/openqa/selenium/htmlunit/BUCK
+++ b/java/client/test/org/openqa/selenium/htmlunit/BUCK
@@ -2,23 +2,6 @@ java_test(name = 'htmlunit',
srcs = [
'JavascriptEnabledHtmlUnitDriverTests.java',
],
- vm_args = [
- '-Dselenium.browser=htmlunit_js',
- ],
- deps = [
- '//java/client/src/org/openqa/selenium:selenium',
- '//java/client/src/org/openqa/selenium/remote:remote',
- '//java/client/test/org/openqa/selenium:large-tests',
- '//java/client/test/org/openqa/selenium:tests',
- '//third_party/java/junit:junit',
- '//third_party/java/selenium:htmlunit-driver',
- ],
-)
-
-java_test(name = 'htmlunit-no-js',
- srcs = [
- 'HtmlUnitDriverTests.java',
- ],
vm_args = [
'-Dselenium.browser=htmlunit',
],
diff --git a/java/client/test/org/openqa/selenium/ie/InternetExplorerDriverTest.java b/java/client/test/org/openqa/selenium/ie/InternetExplorerDriverTest.java
index 958a2e08a2ef3..282c11086df92 100644
--- a/java/client/test/org/openqa/selenium/ie/InternetExplorerDriverTest.java
+++ b/java/client/test/org/openqa/selenium/ie/InternetExplorerDriverTest.java
@@ -30,7 +30,6 @@
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.TestUtilities;
@@ -64,7 +63,6 @@ public void canStartMultipleIeDriverInstances() {
}
}
- @JavascriptEnabled
@NoDriverAfterTest
@NeedsLocalEnvironment
@Test
diff --git a/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java b/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java
index ad0bd00e2ee9b..7bc5a175c468c 100644
--- a/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java
+++ b/java/client/test/org/openqa/selenium/interactions/BasicKeyboardInterfaceTest.java
@@ -36,7 +36,6 @@
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.TestUtilities;
/**
@@ -49,7 +48,6 @@ private Actions getBuilder(WebDriver driver) {
return new Actions(driver);
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testBasicKeyboardInput() {
@@ -64,7 +62,6 @@ public void testBasicKeyboardInput() {
shortWait.until(ExpectedConditions.attributeToBe(keyReporter, "value", "abc def"));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
@@ -87,7 +84,6 @@ public void testSendingKeyDownOnly() {
logText.endsWith("keydown"));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
@@ -113,7 +109,6 @@ public void testSendingKeyUp() {
eventsText.endsWith("keyup"));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
@@ -142,7 +137,6 @@ public void testSendingKeysWithShiftPressed() {
assertThat(keysEventInput.getAttribute("value"), is("AB"));
}
- @JavascriptEnabled
@Test
public void testSendingKeysToActiveElement() {
driver.get(pages.bodyTypingPage);
@@ -169,7 +163,6 @@ public void testBasicKeyboardInputOnActiveElement() {
shortWait.until(ExpectedConditions.attributeToBe(keyReporter, "value", "abc def"));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void canGenerateKeyboardShortcuts() {
@@ -214,7 +207,6 @@ public void testSelectionSelectBySymbol() {
assertThat(keyReporter.getAttribute("value"), is("abc d"));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
@@ -244,7 +236,6 @@ public void testSelectionSelectByWord() {
ExpectedConditions.attributeToBe(keyReporter, "value", "abc "));
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(MARIONETTE)
diff --git a/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java b/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java
index fcf62c43ef91b..be0ab6aca702e 100644
--- a/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java
+++ b/java/client/test/org/openqa/selenium/interactions/BasicMouseInterfaceTest.java
@@ -46,7 +46,6 @@
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsFreshDriver;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
@@ -93,7 +92,6 @@ private void performDragAndDropWithMouse() {
}
}
- @JavascriptEnabled
@Test
public void testDraggingElementWithMouseMovesItToAnotherList() {
performDragAndDropWithMouse();
@@ -101,7 +99,6 @@ public void testDraggingElementWithMouseMovesItToAnotherList() {
assertEquals(6, dragInto.findElements(By.tagName("li")).size());
}
- @JavascriptEnabled
// This test is very similar to testDraggingElementWithMouse. The only
// difference is that this test also verifies the correct events were fired.
@Test
@@ -123,7 +120,6 @@ private boolean isElementAvailable(WebDriver driver, By locator) {
}
}
- @JavascriptEnabled
@Test
public void testDoubleClickThenGet() {
// Fails in ff3 if WebLoadingListener removes browser listener
@@ -137,7 +133,6 @@ public void testDoubleClickThenGet() {
driver.get(pages.droppableItems);
}
- @JavascriptEnabled
@Test
public void testDragAndDrop() throws InterruptedException {
driver.get(pages.droppableItems);
@@ -173,7 +168,6 @@ public void testDragAndDrop() throws InterruptedException {
assertEquals("Dropped!", text);
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testDoubleClick() {
@@ -189,7 +183,6 @@ public void testDoubleClick() {
testFieldContent);
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testContextClick() {
@@ -204,7 +197,6 @@ public void testContextClick() {
toContextClick.getAttribute("value"));
}
- @JavascriptEnabled
@Test
public void testMoveAndClick() {
driver.get(pages.javascriptPage);
@@ -221,7 +213,6 @@ public void testMoveAndClick() {
toClick.getAttribute("value"));
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -238,7 +229,6 @@ public void testCannotMoveToANullLocator() {
}
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -325,7 +315,6 @@ public void testShouldClickElementInIFrame() {
wait.until(elementTextToEqual(By.id("span"), "An inline element"));
}
- @JavascriptEnabled
@Test
public void testShouldAllowUsersToHoverOverElements() {
driver.get(pages.javascriptPage);
@@ -342,7 +331,6 @@ public void testShouldAllowUsersToHoverOverElements() {
assertEquals("Item 1", item.getText());
}
- @JavascriptEnabled
@Test
public void testHoverPersists() throws Exception {
driver.get(pages.javascriptPage);
@@ -366,7 +354,6 @@ public void testHoverPersists() throws Exception {
assertEquals("Item 1", item.getText());
}
- @JavascriptEnabled
@Test
@NotYetImplemented(HTMLUNIT)
public void testMovingMouseByRelativeOffset() {
@@ -384,7 +371,6 @@ public void testMovingMouseByRelativeOffset() {
wait.until(fuzzyMatchingOfCoordinates(reporter, 60, 220));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@NotYetImplemented(HTMLUNIT)
@@ -399,7 +385,6 @@ public void testMovingMouseToRelativeElementOffset() {
wait.until(fuzzyMatchingOfCoordinates(reporter, 95, 195));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@NotYetImplemented(HTMLUNIT)
@@ -414,7 +399,6 @@ public void testMovingMouseToRelativeZeroElementOffset() {
wait.until(fuzzyMatchingOfCoordinates(reporter, 0, 0));
}
- @JavascriptEnabled
@NeedsFreshDriver({IE, CHROME})
@Test
@Ignore(MARIONETTE)
@@ -433,7 +417,6 @@ public void testMoveRelativeToBody() {
}
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@NotYetImplemented(HTMLUNIT)
@@ -462,7 +445,6 @@ public void testMoveMouseByOffsetOverAndOutOfAnElement() {
shortWait.until(attributeToBe(redbox, "background-color", Colors.GREEN.getColorValue().asRgba()));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@NotYetImplemented(HTMLUNIT)
diff --git a/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java b/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java
index 30b9dca683519..3b7802c9291c5 100644
--- a/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java
+++ b/java/client/test/org/openqa/selenium/interactions/CombinedInputActionsTest.java
@@ -47,7 +47,6 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
@@ -59,7 +58,6 @@
@Ignore(value = SAFARI, reason = "Safari: not implemented (issue 4136)")
public class CombinedInputActionsTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -86,7 +84,6 @@ public void testPlainClickingOnMultiSelectionList() {
resultElement.getText());
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -114,7 +111,6 @@ public void testShiftClickingOnMultiSelectionList() {
resultElement.getText());
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -143,7 +139,6 @@ public void testControlClickingOnMultiSelectionList() {
resultElement.getText());
}
- @JavascriptEnabled
@Test
@Ignore(IE)
@Ignore(PHANTOMJS)
@@ -348,7 +343,6 @@ public void testCombiningShiftAndClickResultsInANewWindow() {
assertEquals("Should not have navigated away.", originalTitle, driver.getTitle());
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
@Ignore(IE)
@@ -364,7 +358,6 @@ public void testHoldingDownShiftKeyWhileClicking() {
assertThat(shiftInfo.getText(), equalTo("true"));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void canClickOnASuckerFishStyleMenu() throws InterruptedException {
@@ -391,7 +384,6 @@ public void canClickOnASuckerFishStyleMenu() throws InterruptedException {
wait.until(WaitingConditions.elementTextToContain(result, "item 1"));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testCanClickOnSuckerFishMenuItem() throws Exception {
diff --git a/java/client/test/org/openqa/selenium/interactions/DragAndDropTest.java b/java/client/test/org/openqa/selenium/interactions/DragAndDropTest.java
index 87f93b748e66f..9306bbe73325b 100644
--- a/java/client/test/org/openqa/selenium/interactions/DragAndDropTest.java
+++ b/java/client/test/org/openqa/selenium/interactions/DragAndDropTest.java
@@ -40,7 +40,6 @@
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NeedsFreshDriver;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
@@ -53,7 +52,6 @@
@Ignore(value = HTMLUNIT, reason = "Advanced mouse actions only implemented in rendered browsers")
public class DragAndDropTest extends JUnit4TestBase {
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testDragAndDropRelative() {
@@ -74,7 +72,6 @@ public void testDragAndDropRelative() {
wait.until(elementLocationToBe(img, expectedLocation));
}
- @JavascriptEnabled
@Test
@Ignore(MARIONETTE)
public void testDragAndDropToElement() {
@@ -85,7 +82,6 @@ public void testDragAndDropToElement() {
assertEquals(img1.getLocation(), img2.getLocation());
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
public void testDragAndDropToElementInIframe() {
@@ -100,7 +96,6 @@ public void testDragAndDropToElementInIframe() {
assertEquals(img1.getLocation(), img2.getLocation());
}
- @JavascriptEnabled
@SwitchToTopAfterTest
@Test
public void testDragAndDropElementWithOffsetInIframeAtBottom() {
@@ -117,7 +112,6 @@ public void testDragAndDropElementWithOffsetInIframeAtBottom() {
assertEquals(initial.moveBy(20, 20), img1.getLocation());
}
- @JavascriptEnabled
@NeedsFreshDriver // fails in Sauce if run in a dirty state; to be investigated
@Test
@Ignore(value = IE, reason = "IE fails this test if requireWindowFocus=true")
@@ -133,7 +127,6 @@ public void testDragAndDropElementWithOffsetInScrolledDiv() {
assertEquals(initial.moveBy(3700, 3700), el.getLocation());
}
- @JavascriptEnabled
@Test
public void testElementInDiv() {
assumeFalse("See issue 2281", TestUtilities.getEffectivePlatform().is(Platform.MAC));
@@ -145,7 +138,6 @@ public void testElementInDiv() {
assertEquals(expectedLocation, img.getLocation());
}
- @JavascriptEnabled
@Test
@Ignore(CHROME)
@Ignore(IE)
@@ -168,7 +160,6 @@ public void testDragTooFar() {
}
}
- @JavascriptEnabled
@NoDriverAfterTest
// We can't reliably resize the window back afterwards, cross-browser, so have to kill the
// window, otherwise we are stuck with a small window for the rest of the tests.
@@ -195,7 +186,6 @@ private void drag(WebElement elem, Point expectedLocation,
expectedLocation.move(expectedLocation.x + moveRightBy, expectedLocation.y + moveDownBy);
}
- @JavascriptEnabled
@Test
public void testDragAndDropOnJQueryItems() {
driver.get(pages.droppableItems);
@@ -230,7 +220,6 @@ public void testDragAndDropOnJQueryItems() {
assertTrue("Reporter text:" + reporterText, matcher.matches());
}
- @JavascriptEnabled
@Test
@Ignore(value = IE, reason = "IE fails this test if requireWindowFocus=true")
@Ignore(PHANTOMJS)
diff --git a/java/client/test/org/openqa/selenium/support/pagefactory/UsingPageFactoryTest.java b/java/client/test/org/openqa/selenium/support/pagefactory/UsingPageFactoryTest.java
index 634d2a0629162..d7e9212195413 100644
--- a/java/client/test/org/openqa/selenium/support/pagefactory/UsingPageFactoryTest.java
+++ b/java/client/test/org/openqa/selenium/support/pagefactory/UsingPageFactoryTest.java
@@ -34,14 +34,12 @@
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.testing.JUnit4TestBase;
-import org.openqa.selenium.testing.JavascriptEnabled;
import java.util.List;
public class UsingPageFactoryTest extends JUnit4TestBase {
@Test
- @JavascriptEnabled
public void canExecuteJsUsingDecoratedElements() {
driver.get(pages.xhtmlTestPage);
diff --git a/java/client/test/org/openqa/selenium/testing/BUCK b/java/client/test/org/openqa/selenium/testing/BUCK
index 5b83a13691475..546cbb1dd2377 100644
--- a/java/client/test/org/openqa/selenium/testing/BUCK
+++ b/java/client/test/org/openqa/selenium/testing/BUCK
@@ -3,7 +3,6 @@ java_library(name = 'annotations',
'Driver.java',
'Ignore.java',
'IgnoreList.java',
- 'JavascriptEnabled.java',
'NativeEventsRequired.java',
'NeedsLocalEnvironment.java',
'NeedsFreshDriver.java',
diff --git a/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java b/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
index e5094e1312c30..268d0d81b0bb4 100644
--- a/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
+++ b/java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
@@ -293,7 +293,7 @@ private static boolean matches(Browser browser, Driver[] drivers) {
break;
case HTMLUNIT:
- if (browser == Browser.htmlunit || browser == Browser.htmlunit_js) {
+ if (browser == Browser.htmlunit) {
return true;
}
break;
diff --git a/java/client/test/org/openqa/selenium/testing/JavascriptEnabled.java b/java/client/test/org/openqa/selenium/testing/JavascriptEnabled.java
deleted file mode 100644
index fc0b967928185..0000000000000
--- a/java/client/test/org/openqa/selenium/testing/JavascriptEnabled.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Licensed to the Software Freedom Conservancy (SFC) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The SFC licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-package org.openqa.selenium.testing;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
-public @interface JavascriptEnabled {
-
-}
diff --git a/java/client/test/org/openqa/selenium/testing/drivers/Browser.java b/java/client/test/org/openqa/selenium/testing/drivers/Browser.java
index 78847aef77954..ebacf47122c8e 100644
--- a/java/client/test/org/openqa/selenium/testing/drivers/Browser.java
+++ b/java/client/test/org/openqa/selenium/testing/drivers/Browser.java
@@ -15,7 +15,6 @@
// specific language governing permissions and limitations
// under the License.
-
package org.openqa.selenium.testing.drivers;
import java.util.logging.Logger;
@@ -25,13 +24,7 @@ public enum Browser {
chrome,
edge,
ff,
- htmlunit {
- @Override
- public boolean isJavascriptEnabled() {
- return false;
- }
- },
- htmlunit_js,
+ htmlunit,
ie,
none, // For those cases where you don't actually want a browser
opera,
@@ -56,8 +49,4 @@ public static Browser detect() {
}
}
- public boolean isJavascriptEnabled() {
- return true;
- }
-
}
diff --git a/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java b/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java
index 0686321906cda..b3cdf82d8371f 100644
--- a/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java
+++ b/java/client/test/org/openqa/selenium/testing/drivers/BrowserToCapabilities.java
@@ -45,12 +45,6 @@ public static DesiredCapabilities of(Browser browser) {
case htmlunit:
caps = DesiredCapabilities.htmlUnit();
- caps.setJavascriptEnabled(false);
- break;
-
- case htmlunit_js:
- caps = DesiredCapabilities.htmlUnit();
- caps.setJavascriptEnabled(true);
break;
case ie:
diff --git a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java
index ce6bbe482a600..7898a8cc61c8a 100644
--- a/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java
+++ b/java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java
@@ -32,7 +32,6 @@
import static org.openqa.selenium.testing.Driver.SAFARI;
import static org.openqa.selenium.testing.drivers.Browser.chrome;
import static org.openqa.selenium.testing.drivers.Browser.htmlunit;
-import static org.openqa.selenium.testing.drivers.Browser.htmlunit_js;
import static org.openqa.selenium.testing.drivers.Browser.ie;
import static org.openqa.selenium.testing.drivers.Browser.opera;
import static org.openqa.selenium.testing.drivers.Browser.phantomjs;
@@ -44,7 +43,6 @@
import org.openqa.selenium.Platform;
import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.IgnoreList;
-import org.openqa.selenium.testing.JavascriptEnabled;
import org.openqa.selenium.testing.NativeEventsRequired;
import org.openqa.selenium.testing.NeedsLocalEnvironment;
@@ -57,8 +55,7 @@
public class TestIgnorance {
private Set alwaysNativeEvents = ImmutableSet.of(chrome, ie, opera);
- private Set neverNativeEvents = ImmutableSet.of(
- htmlunit, htmlunit_js, phantomjs);
+ private Set neverNativeEvents = ImmutableSet.of(htmlunit, phantomjs);
private IgnoreComparator ignoreComparator = new IgnoreComparator();
private Set methods = Sets.newHashSet();
private Set only = Sets.newHashSet();
@@ -102,9 +99,6 @@ public boolean isIgnored(Description method) {
ignored = !ignored;
}
- ignored |= isIgnoredDueToJavascript(method.getTestClass().getAnnotation(JavascriptEnabled.class));
- ignored |= isIgnoredDueToJavascript(method.getAnnotation(JavascriptEnabled.class));
-
ignored |= isIgnoredBecauseOfNativeEvents(method.getTestClass().getAnnotation(NativeEventsRequired.class));
ignored |= isIgnoredBecauseOfNativeEvents(method.getAnnotation(NativeEventsRequired.class));
@@ -158,10 +152,6 @@ private boolean isIgnoredDueToBeingOnSauce(Description method) {
return Boolean.getBoolean("local_only") && !isLocal;
}
- private boolean isIgnoredDueToJavascript(JavascriptEnabled enabled) {
- return enabled != null && !browser.isJavascriptEnabled();
- }
-
private boolean isIgnoredDueToEnvironmentVariables(Description method) {
return (!only.isEmpty() && !only.contains(method.getTestClass().getSimpleName())) ||
(!methods.isEmpty() && !methods.contains(method.getMethodName())) ||
@@ -199,7 +189,6 @@ private void addIgnoresForBrowser(Browser browser, IgnoreComparator comparator)
break;
case htmlunit:
- case htmlunit_js:
comparator.addDriver(HTMLUNIT);
break;
diff --git a/third_party/java/selenium/BUCK b/third_party/java/selenium/BUCK
index 1cff278c76e18..5a998992f3100 100644
--- a/third_party/java/selenium/BUCK
+++ b/third_party/java/selenium/BUCK
@@ -10,7 +10,6 @@ prebuilt_jar(
visibility = [
'//java/client/src/org/openqa/selenium:client-combined',
'//java/client/test/org/openqa/selenium/htmlunit:htmlunit',
- '//java/client/test/org/openqa/selenium/htmlunit:htmlunit-no-js',
'//java/client/test/org/openqa/selenium/testing:test-base',
'//java/server/src/org/openqa/selenium/remote/server:standalone-server-lib',
'//java/server/test/org/openqa/grid/e2e:tests',