Record Class CaptureStartOptions

java.lang.Object
java.lang.Record
com.shaft.capture.runtime.CaptureStartOptions
Record Components:
targetLanguage - requested generation target
testIdAttribute - preferred test id attribute
channel - Chromium channel hint
deviceName - device emulation hint
viewportSize - viewport size as width,height
colorScheme - preferred color scheme hint
geolocation - geolocation as latitude,longitude
ignoreHttpsErrors - whether HTTPS certificate errors are ignored
blockServiceWorkers - whether service workers should be blocked
loadStoragePath - storage-state input path
saveStoragePath - storage-state output path
language - locale/language hint
timezone - timezone hint
proxyServer - proxy server URL
proxyBypass - comma-separated proxy bypass list
saveHarPath - HAR output path
saveHarGlob - HAR URL glob filter
timeout - maximum browser timeout
userAgent - user-agent override
userDataDirectory - persistent browser profile directory
sessionGoal - human-readable recording goal
apiCapture - whether API network recording is enabled for this session
networkOptions - network capture filtering options; ignored unless apiCapture is set
saveHarContent - HAR body-content emission mode: blank or none (the default) keeps today's truncated network-trace preview bodies; full emits complete request/response bodies from API-capture's full-body store (redacted headers, text or base64 body encoding by content type) for every network transaction recorded during the session, falling back to preview bodies with a warning when no such transactions were recorded (for example when apiCapture was not enabled). Full bodies are opt-in because, unlike headers, they are not scrubbed for secrets/PII.

public record CaptureStartOptions(String targetLanguage, String testIdAttribute, String channel, String deviceName, String viewportSize, String colorScheme, String geolocation, boolean ignoreHttpsErrors, boolean blockServiceWorkers, String loadStoragePath, String saveStoragePath, String language, String timezone, String proxyServer, String proxyBypass, String saveHarPath, String saveHarGlob, Duration timeout, String userAgent, Path userDataDirectory, String sessionGoal, boolean apiCapture, NetworkCaptureOptions networkOptions, String saveHarContent) extends Record
Playwright-codegen-shaped options accepted by SHAFT Capture.
  • Constructor Details

    • CaptureStartOptions

      public CaptureStartOptions(String targetLanguage, String testIdAttribute, String channel, String deviceName, String viewportSize, String colorScheme, String geolocation, boolean ignoreHttpsErrors, boolean blockServiceWorkers, String loadStoragePath, String saveStoragePath, String language, String timezone, String proxyServer, String proxyBypass, String saveHarPath, String saveHarGlob, Duration timeout, String userAgent, Path userDataDirectory, String sessionGoal, boolean apiCapture, NetworkCaptureOptions networkOptions, String saveHarContent)
      Creates normalized capture options.
    • CaptureStartOptions

      public CaptureStartOptions(String targetLanguage, String testIdAttribute, String channel, String deviceName, String viewportSize, String colorScheme, String geolocation, boolean ignoreHttpsErrors, boolean blockServiceWorkers, String loadStoragePath, String saveStoragePath, String language, String timezone, String proxyServer, String proxyBypass, String saveHarPath, String saveHarGlob, Duration timeout, String userAgent, Path userDataDirectory, String sessionGoal, boolean apiCapture, NetworkCaptureOptions networkOptions)
      Creates normalized capture options with a session goal and API capture settings, using the default (none) HAR body-content mode. Kept for source compatibility with callers built before saveHarContent was added (this was the canonical all-arguments constructor then).
      Parameters:
      targetLanguage - requested generation target
      testIdAttribute - preferred test id attribute
      channel - Chromium channel hint
      deviceName - device emulation hint
      viewportSize - viewport size as width,height
      colorScheme - preferred color scheme hint
      geolocation - geolocation as latitude,longitude
      ignoreHttpsErrors - whether HTTPS certificate errors are ignored
      blockServiceWorkers - whether service workers should be blocked
      loadStoragePath - storage-state input path
      saveStoragePath - storage-state output path
      language - locale/language hint
      timezone - timezone hint
      proxyServer - proxy server URL
      proxyBypass - comma-separated proxy bypass list
      saveHarPath - HAR output path
      saveHarGlob - HAR URL glob filter
      timeout - maximum browser timeout
      userAgent - user-agent override
      userDataDirectory - persistent browser profile directory
      sessionGoal - human-readable recording goal
      apiCapture - whether API network recording is enabled for this session
      networkOptions - network capture filtering options; ignored unless apiCapture is set
    • CaptureStartOptions

      public CaptureStartOptions(String targetLanguage, String testIdAttribute, String channel, String deviceName, String viewportSize, String colorScheme, String geolocation, boolean ignoreHttpsErrors, boolean blockServiceWorkers, String loadStoragePath, String saveStoragePath, String language, String timezone, String proxyServer, String proxyBypass, String saveHarPath, String saveHarGlob, Duration timeout, String userAgent, Path userDataDirectory)
      Creates normalized capture options without a session goal or API capture settings.
    • CaptureStartOptions

      public CaptureStartOptions(String targetLanguage, String testIdAttribute, String channel, String deviceName, String viewportSize, String colorScheme, String geolocation, boolean ignoreHttpsErrors, boolean blockServiceWorkers, String loadStoragePath, String saveStoragePath, String language, String timezone, String proxyServer, String proxyBypass, String saveHarPath, String saveHarGlob, Duration timeout, String userAgent, Path userDataDirectory, String sessionGoal)
      Creates normalized capture options with a session goal but without API capture settings.
      Parameters:
      targetLanguage - requested generation target
      testIdAttribute - preferred test id attribute
      channel - Chromium channel hint
      deviceName - device emulation hint
      viewportSize - viewport size as width,height
      colorScheme - preferred color scheme hint
      geolocation - geolocation as latitude,longitude
      ignoreHttpsErrors - whether HTTPS certificate errors are ignored
      blockServiceWorkers - whether service workers should be blocked
      loadStoragePath - storage-state input path
      saveStoragePath - storage-state output path
      language - locale/language hint
      timezone - timezone hint
      proxyServer - proxy server URL
      proxyBypass - comma-separated proxy bypass list
      saveHarPath - HAR output path
      saveHarGlob - HAR URL glob filter
      timeout - maximum browser timeout
      userAgent - user-agent override
      userDataDirectory - persistent browser profile directory
      sessionGoal - human-readable recording goal
  • Method Details

    • defaults

      public static CaptureStartOptions defaults()
      Returns default options.
      Returns:
      default options
    • testIdAttributes

      public List<String> testIdAttributes()
      Returns preferred test id attributes in locator-priority order.
      Returns:
      test id attributes
    • viewport

      public CaptureStartOptions.Viewport viewport()
      Parses the requested viewport.
      Returns:
      parsed viewport or null
    • warnings

      public List<String> warnings()
      Returns safe warnings for accepted-but-not-native Playwright codegen options.
      Returns:
      warning list
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • targetLanguage

      public String targetLanguage()
      Returns the value of the targetLanguage record component.
      Returns:
      the value of the targetLanguage record component
    • testIdAttribute

      public String testIdAttribute()
      Returns the value of the testIdAttribute record component.
      Returns:
      the value of the testIdAttribute record component
    • channel

      public String channel()
      Returns the value of the channel record component.
      Returns:
      the value of the channel record component
    • deviceName

      public String deviceName()
      Returns the value of the deviceName record component.
      Returns:
      the value of the deviceName record component
    • viewportSize

      public String viewportSize()
      Returns the value of the viewportSize record component.
      Returns:
      the value of the viewportSize record component
    • colorScheme

      public String colorScheme()
      Returns the value of the colorScheme record component.
      Returns:
      the value of the colorScheme record component
    • geolocation

      public String geolocation()
      Returns the value of the geolocation record component.
      Returns:
      the value of the geolocation record component
    • ignoreHttpsErrors

      public boolean ignoreHttpsErrors()
      Returns the value of the ignoreHttpsErrors record component.
      Returns:
      the value of the ignoreHttpsErrors record component
    • blockServiceWorkers

      public boolean blockServiceWorkers()
      Returns the value of the blockServiceWorkers record component.
      Returns:
      the value of the blockServiceWorkers record component
    • loadStoragePath

      public String loadStoragePath()
      Returns the value of the loadStoragePath record component.
      Returns:
      the value of the loadStoragePath record component
    • saveStoragePath

      public String saveStoragePath()
      Returns the value of the saveStoragePath record component.
      Returns:
      the value of the saveStoragePath record component
    • language

      public String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • timezone

      public String timezone()
      Returns the value of the timezone record component.
      Returns:
      the value of the timezone record component
    • proxyServer

      public String proxyServer()
      Returns the value of the proxyServer record component.
      Returns:
      the value of the proxyServer record component
    • proxyBypass

      public String proxyBypass()
      Returns the value of the proxyBypass record component.
      Returns:
      the value of the proxyBypass record component
    • saveHarPath

      public String saveHarPath()
      Returns the value of the saveHarPath record component.
      Returns:
      the value of the saveHarPath record component
    • saveHarGlob

      public String saveHarGlob()
      Returns the value of the saveHarGlob record component.
      Returns:
      the value of the saveHarGlob record component
    • timeout

      public Duration timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • userAgent

      public String userAgent()
      Returns the value of the userAgent record component.
      Returns:
      the value of the userAgent record component
    • userDataDirectory

      public Path userDataDirectory()
      Returns the value of the userDataDirectory record component.
      Returns:
      the value of the userDataDirectory record component
    • sessionGoal

      public String sessionGoal()
      Returns the value of the sessionGoal record component.
      Returns:
      the value of the sessionGoal record component
    • apiCapture

      public boolean apiCapture()
      Returns the value of the apiCapture record component.
      Returns:
      the value of the apiCapture record component
    • networkOptions

      public NetworkCaptureOptions networkOptions()
      Returns the value of the networkOptions record component.
      Returns:
      the value of the networkOptions record component
    • saveHarContent

      public String saveHarContent()
      Returns the value of the saveHarContent record component.
      Returns:
      the value of the saveHarContent record component