Skip to content

Commit 429405e

Browse files
authored
Only wait for JavaScript that is running ~now (#985)
1 parent 25f911c commit 429405e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/htmlunit/WebClientUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static void waitForJSExec(WebClient webClient) {
5454
*/
5555
public static void waitForJSExec(WebClient webClient, long timeout) {
5656
webClient.getJavaScriptEngine().processPostponedActions();
57-
webClient.waitForBackgroundJavaScript(timeout);
57+
webClient.waitForBackgroundJavaScriptStartingBefore(2_000, timeout);
5858
}
5959

6060
/**

0 commit comments

Comments
 (0)