Package org.htmlunit
Class WebClientUtil
java.lang.Object
org.htmlunit.WebClientUtil
WebClient helper methods.- Author:
- tom.fennelly@gmail.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classJavaScript Exception listener. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionListener(org.htmlunit.WebClient webClient) Create and add anWebClientUtil.ExceptionListenerto theWebClientinstance.static voidwaitForJSExec(org.htmlunit.WebClient webClient) Wait for all async JavaScript tasks associated with the suppliedWebClientinstance to complete.static voidwaitForJSExec(org.htmlunit.WebClient webClient, long timeout) Wait for all async JavaScript tasks associated with the suppliedWebClientinstance to complete.
-
Constructor Details
-
WebClientUtil
public WebClientUtil()
-
-
Method Details
-
waitForJSExec
public static void waitForJSExec(org.htmlunit.WebClient webClient) Wait for all async JavaScript tasks associated with the suppliedWebClientinstance to complete.Waits for 10 seconds before timing out.
- Parameters:
webClient- TheWebClientinstance.
-
waitForJSExec
public static void waitForJSExec(org.htmlunit.WebClient webClient, long timeout) Wait for all async JavaScript tasks associated with the suppliedWebClientinstance to complete.- Parameters:
webClient- TheWebClientinstance.timeout- The timeout in milliseconds.
-
addExceptionListener
public static WebClientUtil.ExceptionListener addExceptionListener(org.htmlunit.WebClient webClient) Create and add anWebClientUtil.ExceptionListenerto theWebClientinstance.- Parameters:
webClient- TheWebClientinstance.- Returns:
- The
WebClientUtil.ExceptionListener.
-