Quit setting timeouts to negative values.
W3C no longer supports setting timeouts to negative values.
This change either sets page load timeout to 300 seconds, or does not set it
all.
@@ -401,12 +401,8 @@ public void testShouldNotHangIfDocumentOpenCallIsNeverFollowedByDocumentCloseCal
@NoDriverAfterTest
@Test
public void testPageLoadTimeoutCanBeChanged() {
- try {
testPageLoadTimeoutIsEnforced(2);
testPageLoadTimeoutIsEnforced(3);
- } finally {
- driver.manage().timeouts().pageLoadTimeout(-1, SECONDS);
- }
}
@Ignore(value = {SAFARI, MARIONETTE},
@@ -419,7 +415,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToLoad() {
try {
testPageLoadTimeoutIsEnforced(2);
} finally {
- driver.manage().timeouts().pageLoadTimeout(-1, SECONDS);
+ driver.manage().timeouts().pageLoadTimeout(300, SECONDS);
}
// Load another page after get() timed out but before test HTTP server served previous page.
@@ -458,7 +454,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToLoadAfterClick() {
assertThat(duration, greaterThan(2000));
assertThat(duration, lessThan(5000));
} finally {
- driver.manage().timeouts().pageLoadTimeout(-1, SECONDS);
+ driver.manage().timeouts().pageLoadTimeout(300, SECONDS);
}
// Load another page after get() timed out but before test HTTP server served previous page.
@@ -493,7 +489,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToRefresh() {
assertThat(duration, greaterThan(2000));
assertThat(duration, lessThan(5000));
} finally {
- driver.manage().timeouts().pageLoadTimeout(-1, SECONDS);
+ driver.manage().timeouts().pageLoadTimeout(300, SECONDS);
}
// Load another page after get() timed out but before test HTTP server served previous page.
@@ -512,7 +508,7 @@ public void testShouldNotStopLoadingPageAfterTimeout() {
try {
testPageLoadTimeoutIsEnforced(1);
} finally {
- driver.manage().timeouts().pageLoadTimeout(-1, SECONDS);
+ driver.manage().timeouts().pageLoadTimeout(300, SECONDS);
}
new WebDriverWait(driver, 30)
