Skip to content

Commit

Permalink
do not zero out implicit wait during location call
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Sep 27, 2017
1 parent a6df515 commit 721c2fe
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ private void changeImplicitlyWaitTimeOut(long newTimeOut, TimeUnit newTimeUnit)
private <T extends Object> T waitFor(Supplier<T> supplier) {
WaitingFunction<T> function = new WaitingFunction<>();
try {
changeImplicitlyWaitTimeOut(0, TimeUnit.SECONDS);
FluentWait<Supplier<T>> wait = new FluentWait<>(supplier)
.ignoring(NoSuchElementException.class);
wait.withTimeout(timeOutDuration.getTime(), timeOutDuration.getTimeUnit());
Expand All @@ -94,8 +93,6 @@ private <T extends Object> T waitFor(Supplier<T> supplier) {
.class.cast(function.foundStaleElementReferenceException);
}
throw e;
} finally {
changeImplicitlyWaitTimeOut(originalTimeOutDuration.getTime(), originalTimeOutDuration.getTimeUnit());
}
}

Expand Down

0 comments on commit 721c2fe

Please sign in to comment.