@@ -401,12 +401,8 @@ public void testShouldNotHangIfDocumentOpenCallIsNeverFollowedByDocumentCloseCal
401
401
@ NoDriverAfterTest
402
402
@ Test
403
403
public void testPageLoadTimeoutCanBeChanged () {
404
- try {
405
- testPageLoadTimeoutIsEnforced (2 );
406
- testPageLoadTimeoutIsEnforced (3 );
407
- } finally {
408
- driver .manage ().timeouts ().pageLoadTimeout (-1 , SECONDS );
409
- }
404
+ testPageLoadTimeoutIsEnforced (2 );
405
+ testPageLoadTimeoutIsEnforced (3 );
410
406
}
411
407
412
408
@ Ignore (value = {SAFARI , MARIONETTE },
@@ -419,7 +415,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToLoad() {
419
415
try {
420
416
testPageLoadTimeoutIsEnforced (2 );
421
417
} finally {
422
- driver .manage ().timeouts ().pageLoadTimeout (- 1 , SECONDS );
418
+ driver .manage ().timeouts ().pageLoadTimeout (300 , SECONDS );
423
419
}
424
420
425
421
// Load another page after get() timed out but before test HTTP server served previous page.
@@ -458,7 +454,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToLoadAfterClick() {
458
454
assertThat (duration , greaterThan (2000 ));
459
455
assertThat (duration , lessThan (5000 ));
460
456
} finally {
461
- driver .manage ().timeouts ().pageLoadTimeout (- 1 , SECONDS );
457
+ driver .manage ().timeouts ().pageLoadTimeout (300 , SECONDS );
462
458
}
463
459
464
460
// Load another page after get() timed out but before test HTTP server served previous page.
@@ -493,7 +489,7 @@ public void testShouldTimeoutIfAPageTakesTooLongToRefresh() {
493
489
assertThat (duration , greaterThan (2000 ));
494
490
assertThat (duration , lessThan (5000 ));
495
491
} finally {
496
- driver .manage ().timeouts ().pageLoadTimeout (- 1 , SECONDS );
492
+ driver .manage ().timeouts ().pageLoadTimeout (300 , SECONDS );
497
493
}
498
494
499
495
// Load another page after get() timed out but before test HTTP server served previous page.
@@ -512,7 +508,7 @@ public void testShouldNotStopLoadingPageAfterTimeout() {
512
508
try {
513
509
testPageLoadTimeoutIsEnforced (1 );
514
510
} finally {
515
- driver .manage ().timeouts ().pageLoadTimeout (- 1 , SECONDS );
511
+ driver .manage ().timeouts ().pageLoadTimeout (300 , SECONDS );
516
512
}
517
513
518
514
new WebDriverWait (driver , 30 )
0 commit comments