Interface Web

All Superinterfaces:
org.aeonbits.owner.Config, EngineProperties<Web>, Serializable

@Sources({"system:properties","file:src/main/resources/properties/WebCapabilities.properties","file:src/main/resources/properties/default/WebCapabilities.properties","classpath:WebCapabilities.properties"}) public interface Web extends EngineProperties<Web>
Configuration properties interface for web browser capabilities in the SHAFT framework. Controls target browser type, headless mode, window size, page load strategy, and mobile emulation.

Use set() to override values programmatically:

SHAFT.Properties.web.set().targetBrowserName("firefox").headlessExecution(true);
  • Method Details

    • targetBrowserName

      @Key("targetBrowserName") @DefaultValue("chrome") String targetBrowserName()
    • forceBrowserDownload

      @Key("forceBrowserDownload") @DefaultValue("false") boolean forceBrowserDownload()
    • headlessExecution

      @Key("headlessExecution") @DefaultValue("false") boolean headlessExecution()
    • incognitoMode

      @Key("incognitoMode") @DefaultValue("false") boolean incognitoMode()
    • isMobileEmulation

      @Key("isMobileEmulation") @DefaultValue("false") boolean isMobileEmulation()
    • mobileEmulationIsCustomDevice

      @Key("mobileEmulation.isCustomDevice") @DefaultValue("false") boolean mobileEmulationIsCustomDevice()
    • mobileEmulationDeviceName

      @Key("mobileEmulation.deviceName") @DefaultValue("") String mobileEmulationDeviceName()
    • mobileEmulationWidth

      @Key("mobileEmulation.width") @DefaultValue("") int mobileEmulationWidth()
    • mobileEmulationHeight

      @Key("mobileEmulation.height") @DefaultValue("") int mobileEmulationHeight()
    • mobileEmulationPixelRatio

      @Key("mobileEmulation.pixelRatio") @DefaultValue("1.0") double mobileEmulationPixelRatio()
    • mobileEmulationUserAgent

      @Key("mobileEmulation.userAgent") @DefaultValue("") String mobileEmulationUserAgent()
    • baseURL

      @Key("baseURL") @DefaultValue("") String baseURL()
    • browserWindowWidth

      @Key("browserWindowWidth") @DefaultValue("1920") int browserWindowWidth()
    • browserWindowHeight

      @Key("browserWindowHeight") @DefaultValue("1080") int browserWindowHeight()
    • pageLoadStrategy

      @Key("pageLoadStrategy") @DefaultValue("none") String pageLoadStrategy()
    • readinessState

      @Key("readinessState") @DefaultValue("none") String readinessState()
    • storageStatePath

      @Key("storageStatePath") @DefaultValue("") String storageStatePath()
      Path to a storage-state JSON file (the schema produced by BrowserActions.saveStorageState) that a freshly-initialized driver should automatically load, restoring cookies and, when possible, localStorage/sessionStorage.

      At driver-init time there is no page loaded yet, so cookies cannot simply be added for an arbitrary domain. SHAFT reads the origin recorded inside the storage-state file (falling back to baseURL() when the file has none) and navigates the fresh driver there first, mirroring how loadStorageState recommends navigating before loading. Origin-scoped localStorage/sessionStorage is therefore restored correctly only when an origin could be resolved; if neither is available, only cookies that the driver accepts without a page navigation are restored. A failure to load (missing file, unreachable origin, etc.) is logged as a warning and does not fail driver initialization.

      Default is blank, meaning the feature is disabled.

    • set

      default Web.SetProperty set()
      Description copied from interface: EngineProperties
      Returns a fluent EngineProperties.SetProperty builder that allows programmatic override of individual configuration properties at runtime.
      Specified by:
      set in interface EngineProperties<Web>
      Returns:
      a new EngineProperties.SetProperty instance for chaining property overrides