Class W3cDriverOptions

java.lang.Object
io.karatelabs.driver.w3c.W3cDriverOptions
All Implemented Interfaces:
DriverOptions

public class W3cDriverOptions extends Object implements DriverOptions
W3C WebDriver configuration options. Supports both programmatic construction and config map from Gherkin.

Compatible with v1 configuration keys: webDriverUrl, webDriverSession, capabilities, start, executable, port, addOptions.

  • Method Details

    • fromMap

      public static W3cDriverOptions fromMap(Map<String,Object> map)
      Create options from a config map (from configure driver = {...}).
    • buildSessionPayload

      public Map<String,Object> buildSessionPayload()
      Build the W3C session creation payload. Compatible with v1: supports webDriverSession for full override, capabilities for merge, and auto-generates minimal caps from browser type.
    • getTimeout

      public int getTimeout()
      Description copied from interface: DriverOptions
      Get timeout in milliseconds.
      Specified by:
      getTimeout in interface DriverOptions
    • getTimeoutDuration

      public Duration getTimeoutDuration()
      Description copied from interface: DriverOptions
      Get timeout as Duration.
      Specified by:
      getTimeoutDuration in interface DriverOptions
    • getRetryCount

      public int getRetryCount()
      Description copied from interface: DriverOptions
      Get retry count for operations.
      Specified by:
      getRetryCount in interface DriverOptions
    • getRetryInterval

      public int getRetryInterval()
      Description copied from interface: DriverOptions
      Get retry interval in milliseconds.
      Specified by:
      getRetryInterval in interface DriverOptions
    • isHeadless

      public boolean isHeadless()
      Description copied from interface: DriverOptions
      Check if running in headless mode.
      Specified by:
      isHeadless in interface DriverOptions
    • isScreenshotOnFailure

      public boolean isScreenshotOnFailure()
      Description copied from interface: DriverOptions
      Check if screenshots should be taken on failure.
      Specified by:
      isScreenshotOnFailure in interface DriverOptions
    • isHighlight

      public boolean isHighlight()
      Description copied from interface: DriverOptions
      Check if element highlighting is enabled.
      Specified by:
      isHighlight in interface DriverOptions
    • getHighlightDuration

      public int getHighlightDuration()
      Description copied from interface: DriverOptions
      Get highlight duration in milliseconds.
      Specified by:
      getHighlightDuration in interface DriverOptions
    • getPageLoadStrategy

      public PageLoadStrategy getPageLoadStrategy()
      Description copied from interface: DriverOptions
      Get page load strategy.
      Specified by:
      getPageLoadStrategy in interface DriverOptions
    • getPreSubmitHash

      public String getPreSubmitHash()
      Description copied from interface: DriverOptions
      Get the pre-submit hash (set by submit(), cleared after next action).
      Specified by:
      getPreSubmitHash in interface DriverOptions
    • setPreSubmitHash

      public void setPreSubmitHash(String hash)
      Description copied from interface: DriverOptions
      Set the pre-submit hash. Called by submit() to record page state before action.
      Specified by:
      setPreSubmitHash in interface DriverOptions
    • getBrowserType

      public W3cBrowserType getBrowserType()
    • getWebDriverUrl

      public String getWebDriverUrl()
    • isStart

      public boolean isStart()
    • getExecutable

      public String getExecutable()
    • getPort

      public int getPort()
    • getAddOptions

      public List<String> getAddOptions()
    • getScope

      public String getScope()
    • isRemote

      public boolean isRemote()
      Check if this is a remote connection (webDriverUrl set or start=false).