Skip to content

Commit 9c2e49e

Browse files
committed
Java: Decreasing number of browser restarts in tests
1 parent 3a942a7 commit 9c2e49e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.openqa.selenium.support.ui.ExpectedCondition;
3232
import org.openqa.selenium.testing.Ignore;
3333
import org.openqa.selenium.testing.JUnit4TestBase;
34-
import org.openqa.selenium.testing.NoDriverAfterTest;
34+
import org.openqa.selenium.testing.SwitchToTopAfterTest;
3535
import org.openqa.selenium.testing.TestUtilities;
3636
import org.openqa.selenium.testing.drivers.SauceDriver;
3737

@@ -65,7 +65,7 @@ public void testSetsTheSizeOfTheCurrentWindow() {
6565
changeSizeBy(-20, -20);
6666
}
6767

68-
@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
68+
@SwitchToTopAfterTest
6969
@Test
7070
public void testSetsTheSizeOfTheCurrentWindowFromFrame() {
7171
// Browser window cannot be resized or moved on ANDROID (and most mobile platforms
@@ -80,7 +80,7 @@ public void testSetsTheSizeOfTheCurrentWindowFromFrame() {
8080
changeSizeBy(-20, -20);
8181
}
8282

83-
@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
83+
@SwitchToTopAfterTest
8484
@Test
8585
public void testSetsTheSizeOfTheCurrentWindowFromIframe() {
8686
// Browser window cannot be resized or moved on ANDROID (and most mobile platforms
@@ -148,7 +148,7 @@ public void testCanMaximizeTheWindow() throws InterruptedException {
148148
maximize();
149149
}
150150

151-
@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
151+
@SwitchToTopAfterTest
152152
@Ignore(value = {PHANTOMJS}, reason = "Not yet implemented.")
153153
@Test
154154
public void testCanMaximizeTheWindowFromFrame() throws InterruptedException {
@@ -165,7 +165,7 @@ public void testCanMaximizeTheWindowFromFrame() throws InterruptedException {
165165
}
166166

167167
@Ignore(value = {PHANTOMJS}, reason = "Not yet implemented.")
168-
@NoDriverAfterTest // So that next test never starts with "inside a frame" base state.
168+
@SwitchToTopAfterTest
169169
@Test
170170
public void testCanMaximizeTheWindowFromIframe() throws InterruptedException {
171171
// Browser window cannot be resized or moved on ANDROID (and most mobile platforms

0 commit comments

Comments
 (0)