public class WebClientUtil extends Object
WebClient
helper methods.Modifier and Type | Class and Description |
---|---|
static class |
WebClientUtil.ExceptionListener
JavaScript Exception listener.
|
Constructor and Description |
---|
WebClientUtil() |
Modifier and Type | Method and Description |
---|---|
static WebClientUtil.ExceptionListener |
addExceptionListener(com.gargoylesoftware.htmlunit.WebClient webClient)
Create and add an
WebClientUtil.ExceptionListener to the WebClient instance. |
static void |
waitForJSExec(com.gargoylesoftware.htmlunit.WebClient webClient)
Wait for all async JavaScript tasks associated with the supplied
WebClient instance
to complete. |
static void |
waitForJSExec(com.gargoylesoftware.htmlunit.WebClient webClient,
long timeout)
Wait for all async JavaScript tasks associated with the supplied
WebClient instance
to complete. |
public static void waitForJSExec(com.gargoylesoftware.htmlunit.WebClient webClient)
WebClient
instance
to complete.
Waits for 10 seconds before timing out.
webClient
- The WebClient
instance.public static void waitForJSExec(com.gargoylesoftware.htmlunit.WebClient webClient, long timeout)
WebClient
instance
to complete.webClient
- The WebClient
instance.timeout
- The timeout in milliseconds.public static WebClientUtil.ExceptionListener addExceptionListener(com.gargoylesoftware.htmlunit.WebClient webClient)
WebClientUtil.ExceptionListener
to the WebClient
instance.webClient
- The WebClient
instance.WebClientUtil.ExceptionListener
.Copyright © 2004–2022. All rights reserved.