Class HtmlUnitTimeouts

java.lang.Object
org.openqa.selenium.htmlunit.HtmlUnitTimeouts
All Implemented Interfaces:
org.openqa.selenium.WebDriver.Timeouts

public class HtmlUnitTimeouts extends Object implements org.openqa.selenium.WebDriver.Timeouts
Implements the WebDriver.Timeouts interface for HtmlUnit.

This class stores and manages timeout values used by HtmlUnit-based WebDriver instances, including implicit wait time, script execution timeout, and page load timeout. When a WebClient is provided, these values may be applied directly to the underlying client.

Author:
Martin Bartoš, Ronald Brill
  • Constructor Details

    • HtmlUnitTimeouts

      public HtmlUnitTimeouts()
      Default constructor for HtmlUnitTimeouts.

      Creates an instance without an associated WebClient. All timeouts will need to be configured later if required.

    • HtmlUnitTimeouts

      public HtmlUnitTimeouts(WebClient webClient)
      Constructs an HtmlUnitTimeouts instance associated with the given WebClient.
      Parameters:
      webClient - the WebClient whose timeouts this instance will manage
  • Method Details

    • getImplicitWaitTimeout

      public Duration getImplicitWaitTimeout()
      Specified by:
      getImplicitWaitTimeout in interface org.openqa.selenium.WebDriver.Timeouts
    • implicitlyWait

      public org.openqa.selenium.WebDriver.Timeouts implicitlyWait(Duration duration)
      Specified by:
      implicitlyWait in interface org.openqa.selenium.WebDriver.Timeouts
    • scriptTimeout

      public org.openqa.selenium.WebDriver.Timeouts scriptTimeout(Duration duration)
      Specified by:
      scriptTimeout in interface org.openqa.selenium.WebDriver.Timeouts
    • getScriptTimeout

      public Duration getScriptTimeout()
      Specified by:
      getScriptTimeout in interface org.openqa.selenium.WebDriver.Timeouts
    • pageLoadTimeout

      public org.openqa.selenium.WebDriver.Timeouts pageLoadTimeout(Duration duration)
      Specified by:
      pageLoadTimeout in interface org.openqa.selenium.WebDriver.Timeouts
    • getPageLoadTimeout

      public Duration getPageLoadTimeout()
      Specified by:
      getPageLoadTimeout in interface org.openqa.selenium.WebDriver.Timeouts