Package io.karatelabs.driver
Interface DriverOptions
- All Known Implementing Classes:
CdpDriverOptions,W3cDriverOptions
public interface DriverOptions
Base options interface for browser drivers.
Provides common configuration that applies to all driver backends.
Phase 8: Extracted from CdpDriverOptions to enable multi-backend support.
-
Method Summary
Modifier and TypeMethodDescriptionintGet highlight duration in milliseconds.Get page load strategy.Get the pre-submit hash (set by submit(), cleared after next action).intGet retry count for operations.intGet retry interval in milliseconds.intGet timeout in milliseconds.Get timeout as Duration.booleanCheck if running in headless mode.booleanCheck if element highlighting is enabled.booleanCheck if screenshots should be taken on failure.default 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
-
getTimeout
int getTimeout()Get timeout in milliseconds. -
setTimeout
void setTimeout(int millis) Update the operation timeout in milliseconds. Used byDriver.timeout(int)for v1 parity (mid-scenario timeout tweaks). -
getTimeoutDuration
Duration getTimeoutDuration()Get timeout as Duration. -
getRetryCount
int getRetryCount()Get retry count for operations. -
getRetryInterval
int getRetryInterval()Get retry interval in milliseconds. -
isHeadless
boolean isHeadless()Check if running in headless mode. -
isScreenshotOnFailure
boolean isScreenshotOnFailure()Check if screenshots should be taken on failure. -
isHighlight
boolean isHighlight()Check if element highlighting is enabled. -
getHighlightDuration
int getHighlightDuration()Get highlight duration in milliseconds. -
getPageLoadStrategy
PageLoadStrategy getPageLoadStrategy()Get page load strategy. -
getPreSubmitHash
String getPreSubmitHash()Get the pre-submit hash (set by submit(), cleared after next action). -
setPreSubmitHash
Set the pre-submit hash. Called by submit() to record page state before action. -
isStop
default boolean isStop()Whether 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 }.
-