Package org.htmlunit
Class WebClientUtil
- java.lang.Object
-
- org.htmlunit.WebClientUtil
-
public class WebClientUtil extends Object
WebClienthelper methods.- Author:
- tom.fennelly@gmail.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebClientUtil.ExceptionListenerJavaScript Exception listener.
-
Constructor Summary
Constructors Constructor Description WebClientUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WebClientUtil.ExceptionListeneraddExceptionListener(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.
-
-
-
Method Detail
-
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.
-
-