Package org.htmlunit

Class WebClientUtil

java.lang.Object
org.htmlunit.WebClientUtil

public class WebClientUtil extends Object
WebClient helper methods.
Author:
tom.fennelly@gmail.com
  • 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 supplied WebClient instance to complete.

      Waits for 10 seconds before timing out.

      Parameters:
      webClient - The WebClient instance.
    • waitForJSExec

      public static void waitForJSExec(org.htmlunit.WebClient webClient, long timeout)
      Wait for all async JavaScript tasks associated with the supplied WebClient instance to complete.
      Parameters:
      webClient - The WebClient instance.
      timeout - The timeout in milliseconds.
    • addExceptionListener

      public static WebClientUtil.ExceptionListener addExceptionListener(org.htmlunit.WebClient webClient)
      Create and add an WebClientUtil.ExceptionListener to the WebClient instance.
      Parameters:
      webClient - The WebClient instance.
      Returns:
      The WebClientUtil.ExceptionListener.