Package io.karatelabs.driver.w3c
Class W3cDriverOptions
java.lang.Object
io.karatelabs.driver.w3c.W3cDriverOptions
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionBuild the W3C session creation payload.static W3cDriverOptionsCreate options from a config map (fromconfigure driver = {...}).intGet highlight duration in milliseconds.Get page load strategy.intgetPort()Get the pre-submit hash (set by submit(), cleared after next action).intGet retry count for operations.intGet retry interval in milliseconds.getScope()intGet timeout in milliseconds.Get timeout as Duration.booleanCheck if running in headless mode.booleanCheck if element highlighting is enabled.booleanisRemote()Check if this is a remote connection (webDriverUrl set or start=false).booleanCheck if screenshots should be taken on failure.booleanisStart()booleanisStop()Whether the browser should be quit at scenario end.voidsetPreSubmitHash(String hash) Set the pre-submit hash.voidsetTimeout(int millis) Update the operation timeout in milliseconds.
-
Method Details
-
fromMap
Create options from a config map (fromconfigure driver = {...}). -
buildSessionPayload
Build the W3C session creation payload. Compatible with v1: supportswebDriverSessionfor full override,capabilitiesfor merge, and auto-generates minimal caps from browser type. -
getTimeout
public int getTimeout()Description copied from interface:DriverOptionsGet timeout in milliseconds.- Specified by:
getTimeoutin interfaceDriverOptions
-
setTimeout
public void setTimeout(int millis) Description copied from interface:DriverOptionsUpdate the operation timeout in milliseconds. Used byDriver.timeout(int)for v1 parity (mid-scenario timeout tweaks).- Specified by:
setTimeoutin interfaceDriverOptions
-
getTimeoutDuration
Description copied from interface:DriverOptionsGet timeout as Duration.- Specified by:
getTimeoutDurationin interfaceDriverOptions
-
getRetryCount
public int getRetryCount()Description copied from interface:DriverOptionsGet retry count for operations.- Specified by:
getRetryCountin interfaceDriverOptions
-
getRetryInterval
public int getRetryInterval()Description copied from interface:DriverOptionsGet retry interval in milliseconds.- Specified by:
getRetryIntervalin interfaceDriverOptions
-
isHeadless
public boolean isHeadless()Description copied from interface:DriverOptionsCheck if running in headless mode.- Specified by:
isHeadlessin interfaceDriverOptions
-
isScreenshotOnFailure
public boolean isScreenshotOnFailure()Description copied from interface:DriverOptionsCheck if screenshots should be taken on failure.- Specified by:
isScreenshotOnFailurein interfaceDriverOptions
-
isHighlight
public boolean isHighlight()Description copied from interface:DriverOptionsCheck if element highlighting is enabled.- Specified by:
isHighlightin interfaceDriverOptions
-
getHighlightDuration
public int getHighlightDuration()Description copied from interface:DriverOptionsGet highlight duration in milliseconds.- Specified by:
getHighlightDurationin interfaceDriverOptions
-
getPageLoadStrategy
Description copied from interface:DriverOptionsGet page load strategy.- Specified by:
getPageLoadStrategyin interfaceDriverOptions
-
getPreSubmitHash
Description copied from interface:DriverOptionsGet the pre-submit hash (set by submit(), cleared after next action).- Specified by:
getPreSubmitHashin interfaceDriverOptions
-
setPreSubmitHash
Description copied from interface:DriverOptionsSet the pre-submit hash. Called by submit() to record page state before action.- Specified by:
setPreSubmitHashin interfaceDriverOptions
-
getBrowserType
-
getWebDriverUrl
-
isStart
public boolean isStart() -
getExecutable
-
getPort
public int getPort() -
getAddOptions
-
getScope
-
isStop
public boolean isStop()Description copied from interface:DriverOptionsWhether the browser should be quit at scenario end. Default true. When false, the driver process and browser are intentionally left alive so the DOM can be inspected after the run — typically used for one-off UI debugging. v1 parity:configure driver = { ..., stop: false }.- Specified by:
isStopin interfaceDriverOptions
-
isRemote
public boolean isRemote()Check if this is a remote connection (webDriverUrl set or start=false).
-