Skip to content

Commit 8ad8dab

Browse files
asashourshs96c
authored andcommitted
Delete JavascriptEnabled test annotation
1 parent 0decef7 commit 8ad8dab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3
-412
lines changed

Rakefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ task :all => [
136136
task :all_zip => [:'selenium-java_zip']
137137
task :tests => [
138138
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit",
139-
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit-no-js",
140139
"//java/client/test/org/openqa/selenium/firefox:test-synthesized",
141140
"//java/client/test/org/openqa/selenium/ie:ie",
142141
"//java/client/test/org/openqa/selenium/chrome:chrome",
@@ -188,7 +187,6 @@ task :test_chrome_atoms => [
188187
'//javascript/chrome-driver:test:run',
189188
'//javascript/webdriver:test_chrome:run']
190189
task :test_htmlunit => [
191-
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit-no-js:run",
192190
"//java/client/test/org/openqa/selenium/htmlunit:htmlunit:run"
193191
]
194192
task :test_grid => [

java/client/src/org/openqa/selenium/remote/DesiredCapabilities.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,6 @@ public static DesiredCapabilities htmlUnit() {
203203
return new DesiredCapabilities(BrowserType.HTMLUNIT, "", Platform.ANY);
204204
}
205205

206-
public static DesiredCapabilities htmlUnitWithJs() {
207-
DesiredCapabilities capabilities = new DesiredCapabilities(BrowserType.HTMLUNIT,
208-
"", Platform.ANY);
209-
capabilities.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true);
210-
return capabilities;
211-
}
212-
213206
public static DesiredCapabilities edge() {
214207
return new DesiredCapabilities(BrowserType.EDGE, "", Platform.WINDOWS);
215208
}

java/client/test/org/openqa/selenium/AlertsTest.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.openqa.selenium.support.ui.ExpectedCondition;
4444
import org.openqa.selenium.testing.Ignore;
4545
import org.openqa.selenium.testing.JUnit4TestBase;
46-
import org.openqa.selenium.testing.JavascriptEnabled;
4746
import org.openqa.selenium.testing.NeedsLocalEnvironment;
4847
import org.openqa.selenium.testing.NoDriverAfterTest;
4948
import org.openqa.selenium.testing.NotYetImplemented;
@@ -78,7 +77,6 @@ private String promptPage(String defaultText) {
7877
"<div id='text'>acceptor</div>"));
7978
}
8079

81-
@JavascriptEnabled
8280
@NoDriverAfterTest
8381
@Test
8482
public void testShouldBeAbleToOverrideTheWindowAlertMethod() {
@@ -92,7 +90,6 @@ public void testShouldBeAbleToOverrideTheWindowAlertMethod() {
9290
assertEquals("Testing Alerts", driver.getTitle());
9391
}
9492

95-
@JavascriptEnabled
9693
@Test
9794
public void testShouldAllowUsersToAcceptAnAlertManually() {
9895
driver.get(alertPage("cheese"));
@@ -105,7 +102,6 @@ public void testShouldAllowUsersToAcceptAnAlertManually() {
105102
assertEquals("Testing Alerts", driver.getTitle());
106103
}
107104

108-
@JavascriptEnabled
109105
@Test
110106
public void testShouldAllowUsersToAcceptAnAlertWithNoTextManually() {
111107
driver.get(alertPage(""));
@@ -118,7 +114,6 @@ public void testShouldAllowUsersToAcceptAnAlertWithNoTextManually() {
118114
assertEquals("Testing Alerts", driver.getTitle());
119115
}
120116

121-
@JavascriptEnabled
122117
@NeedsLocalEnvironment(reason = "Carefully timing based")
123118
@Test
124119
@Ignore(CHROME)
@@ -144,7 +139,6 @@ public void testShouldGetTextOfAlertOpenedInSetTimeout() throws Exception {
144139
}
145140
}
146141

147-
@JavascriptEnabled
148142
@Test
149143
public void testShouldAllowUsersToDismissAnAlertManually() {
150144
driver.get(alertPage("cheese"));
@@ -157,7 +151,6 @@ public void testShouldAllowUsersToDismissAnAlertManually() {
157151
assertEquals("Testing Alerts", driver.getTitle());
158152
}
159153

160-
@JavascriptEnabled
161154
@Test
162155
public void testShouldAllowAUserToAcceptAPrompt() {
163156
driver.get(promptPage(null));
@@ -170,7 +163,6 @@ public void testShouldAllowAUserToAcceptAPrompt() {
170163
assertEquals("Testing Prompt", driver.getTitle());
171164
}
172165

173-
@JavascriptEnabled
174166
@Test
175167
public void testShouldAllowAUserToDismissAPrompt() {
176168
driver.get(promptPage(null));
@@ -183,7 +175,6 @@ public void testShouldAllowAUserToDismissAPrompt() {
183175
assertEquals("Testing Prompt", driver.getTitle());
184176
}
185177

186-
@JavascriptEnabled
187178
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
188179
public void testShouldAllowAUserToSetTheValueOfAPrompt() {
189180
driver.get(promptPage(null));
@@ -196,7 +187,6 @@ public void testShouldAllowAUserToSetTheValueOfAPrompt() {
196187
wait.until(textInElementLocated(By.id("text"), "cheese"));
197188
}
198189

199-
@JavascriptEnabled
200190
@Test
201191
@Ignore(CHROME)
202192
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/274")
@@ -214,7 +204,6 @@ public void testSettingTheValueOfAnAlertThrows() {
214204
}
215205
}
216206

217-
@JavascriptEnabled
218207
@Test
219208
public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
220209
driver.get(alertPage("cheese"));
@@ -227,7 +216,6 @@ public void testShouldAllowTheUserToGetTheTextOfAnAlert() {
227216
assertEquals("cheese", value);
228217
}
229218

230-
@JavascriptEnabled
231219
@Test
232220
public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
233221
driver.get(promptPage(null));
@@ -240,7 +228,6 @@ public void testShouldAllowTheUserToGetTheTextOfAPrompt() {
240228
assertEquals("Enter something", value);
241229
}
242230

243-
@JavascriptEnabled
244231
@Test
245232
public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
246233
driver.get(alertPage("cheese"));
@@ -253,7 +240,6 @@ public void testAlertShouldNotAllowAdditionalCommandsIfDismissed() {
253240
assertThat(t, instanceOf(NoAlertPresentException.class));
254241
}
255242

256-
@JavascriptEnabled
257243
@SwitchToTopAfterTest
258244
@Test
259245
@Ignore(MARIONETTE)
@@ -273,7 +259,6 @@ public void testShouldAllowUsersToAcceptAnAlertInAFrame() {
273259
assertEquals("Testing Alerts", driver.getTitle());
274260
}
275261

276-
@JavascriptEnabled
277262
@SwitchToTopAfterTest
278263
@Test
279264
@Ignore(MARIONETTE)
@@ -296,7 +281,6 @@ public void testShouldAllowUsersToAcceptAnAlertInANestedFrame() {
296281
assertEquals("Testing Alerts", driver.getTitle());
297282
}
298283

299-
@JavascriptEnabled
300284
@Test
301285
public void testSwitchingToMissingAlertThrows() throws Exception {
302286
driver.get(alertPage("cheese"));
@@ -305,7 +289,6 @@ public void testSwitchingToMissingAlertThrows() throws Exception {
305289
assertThat(t, instanceOf(NoAlertPresentException.class));
306290
}
307291

308-
@JavascriptEnabled
309292
@Test
310293
public void testSwitchingToMissingAlertInAClosedWindowThrows() throws Exception {
311294
String blank = appServer.create(new Page());
@@ -327,7 +310,6 @@ public void testSwitchingToMissingAlertInAClosedWindowThrows() throws Exception
327310
}
328311
}
329312

330-
@JavascriptEnabled
331313
@Test
332314
public void testPromptShouldUseDefaultValueIfNoKeysSent() {
333315
driver.get(promptPage("This is a default value"));
@@ -339,7 +321,6 @@ public void testPromptShouldUseDefaultValueIfNoKeysSent() {
339321
wait.until(textInElementLocated(By.id("text"), "This is a default value"));
340322
}
341323

342-
@JavascriptEnabled
343324
@Test
344325
public void testPromptShouldHaveNullValueIfDismissed() {
345326
driver.get(promptPage("This is a default value"));
@@ -351,7 +332,6 @@ public void testPromptShouldHaveNullValueIfDismissed() {
351332
wait.until(textInElementLocated(By.id("text"), "null"));
352333
}
353334

354-
@JavascriptEnabled
355335
@Test
356336
@NotYetImplemented(value = MARIONETTE, reason = "https://github.com/mozilla/geckodriver/issues/607")
357337
public void testHandlesTwoAlertsFromOneInteraction() {
@@ -382,7 +362,6 @@ public void testHandlesTwoAlertsFromOneInteraction() {
382362
wait.until(textInElementLocated(By.id("text2"), "cheddar"));
383363
}
384364

385-
@JavascriptEnabled
386365
@Test
387366
@Ignore(CHROME)
388367
public void testShouldHandleAlertOnPageLoad() {
@@ -401,7 +380,6 @@ public void testShouldHandleAlertOnPageLoad() {
401380
wait.until(textInElementLocated(By.tagName("p"), "Page with onload event handler"));
402381
}
403382

404-
@JavascriptEnabled
405383
@Test
406384
@Ignore(CHROME)
407385
public void testShouldHandleAlertOnPageLoadUsingGet() {
@@ -417,7 +395,6 @@ public void testShouldHandleAlertOnPageLoadUsingGet() {
417395
wait.until(textInElementLocated(By.tagName("p"), "Page with onload event handler"));
418396
}
419397

420-
@JavascriptEnabled
421398
@Test
422399
@Ignore(CHROME)
423400
@Ignore(FIREFOX)
@@ -450,7 +427,6 @@ public void testShouldNotHandleAlertInAnotherWindow() {
450427
}
451428
}
452429

453-
@JavascriptEnabled
454430
@Test
455431
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
456432
@NotYetImplemented(HTMLUNIT)
@@ -475,7 +451,6 @@ public void testShouldHandleAlertOnPageUnload() {
475451
wait.until(textInElementLocated(By.id("link"), "open new page"));
476452
}
477453

478-
@JavascriptEnabled
479454
@Test
480455
public void testShouldHandleAlertOnPageBeforeUnload() {
481456
String blank = appServer.create(new Page().withTitle("Success"));
@@ -499,7 +474,6 @@ public void testShouldHandleAlertOnPageBeforeUnload() {
499474
wait.until(titleIs("Success"));
500475
}
501476

502-
@JavascriptEnabled
503477
@NoDriverAfterTest
504478
@Test
505479
public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
@@ -518,7 +492,6 @@ public void testShouldHandleAlertOnPageBeforeUnloadAtQuit() {
518492
driver.quit();
519493
}
520494

521-
@JavascriptEnabled
522495
@Test
523496
@Ignore(value = CHROME, reason = "Chrome does not trigger alerts on unload")
524497
@NotYetImplemented(HTMLUNIT)
@@ -551,7 +524,6 @@ public void testShouldHandleAlertOnWindowClose() {
551524
}
552525
}
553526

554-
@JavascriptEnabled
555527
@Test
556528
@Ignore(CHROME)
557529
@NotYetImplemented(value = MARIONETTE,
@@ -568,7 +540,6 @@ public void testIncludesAlertTextInUnhandledAlertException() {
568540
assertThat(t.getMessage(), containsString("cheese"));
569541
}
570542

571-
@JavascriptEnabled
572543
@NoDriverAfterTest
573544
@Test
574545
public void testCanQuitWhenAnAlertIsPresent() {
@@ -580,7 +551,6 @@ public void testCanQuitWhenAnAlertIsPresent() {
580551
driver.quit();
581552
}
582553

583-
@JavascriptEnabled
584554
@Test
585555
@Ignore(value = MARIONETTE, issue = "https://github.com/mozilla/geckodriver/issues/620")
586556
public void shouldHandleAlertOnFormSubmit() {

java/client/test/org/openqa/selenium/AtomsInjectionTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@
2121

2222
import org.junit.Test;
2323
import org.openqa.selenium.testing.JUnit4TestBase;
24-
import org.openqa.selenium.testing.JavascriptEnabled;
2524

2625
public class AtomsInjectionTest extends JUnit4TestBase {
2726

28-
@JavascriptEnabled
2927
@Test
3028
public void testInjectingAtomShouldNotTrampleOnUnderscoreGlobal() {
3129
driver.get(pages.underscorePage);

java/client/test/org/openqa/selenium/ClickScrollingTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@
3737
import org.openqa.selenium.interactions.MoveTargetOutOfBoundsException;
3838
import org.openqa.selenium.testing.Ignore;
3939
import org.openqa.selenium.testing.JUnit4TestBase;
40-
import org.openqa.selenium.testing.JavascriptEnabled;
4140
import org.openqa.selenium.testing.SwitchToTopAfterTest;
4241

4342
@Ignore(value = HTMLUNIT, reason = "Scrolling requires rendering")
4443
public class ClickScrollingTest extends JUnit4TestBase {
4544

46-
@JavascriptEnabled
4745
@Test
4846
public void testClickingOnAnchorScrollsPage() {
4947
String scrollScript = "";
@@ -86,7 +84,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByOverflow() {
8684
assertEquals("line8", driver.findElement(By.id("clicked")).getText());
8785
}
8886

89-
@JavascriptEnabled
9087
@Test
9188
@Ignore(value = CHROME, reason = "failed")
9289
public void testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow() {
@@ -96,7 +93,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow() {
9693
wait.until(titleIs("Clicked Successfully!"));
9794
}
9895

99-
@JavascriptEnabled
10096
@Test
10197
@Ignore(value = SAFARI, reason = "failed")
10298
public void testShouldBeAbleToClickOnAnElementHiddenByYOverflow() {
@@ -106,7 +102,6 @@ public void testShouldBeAbleToClickOnAnElementHiddenByYOverflow() {
106102
wait.until(titleIs("Clicked Successfully!"));
107103
}
108104

109-
@JavascriptEnabled
110105
@Test
111106
public void testShouldNotScrollOverflowElementsWhichAreVisible() {
112107
driver.get(appServer.whereIs("scroll2.html"));
@@ -118,7 +113,6 @@ public void testShouldNotScrollOverflowElementsWhichAreVisible() {
118113
assertEquals("Should not have scrolled", 0, yOffset);
119114
}
120115

121-
@JavascriptEnabled
122116
@Test
123117
@Ignore(CHROME)
124118
@Ignore(PHANTOMJS)
@@ -219,7 +213,6 @@ public void testShouldBeAbleToClickElementThatIsOutOfViewInANestedFrameThatIsOut
219213
assertTrue(element.isSelected());
220214
}
221215

222-
@JavascriptEnabled
223216
@Test
224217
public void testShouldNotScrollWhenGettingElementSize() {
225218
driver.get(appServer.whereIs("scroll3.html"));

0 commit comments

Comments
 (0)