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

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) extends Record
Playwright-codegen-shaped options accepted by SHAFT Capture.
  • Constructor Details

  • 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