Record Class CaptureStartOptions
java.lang.Object
java.lang.Record
com.shaft.capture.runtime.CaptureStartOptions
- Record Components:
targetLanguage- requested generation targettestIdAttribute- preferred test id attributechannel- Chromium channel hintdeviceName- device emulation hintviewportSize- viewport size aswidth,heightcolorScheme- preferred color scheme hintgeolocation- geolocation aslatitude,longitudeignoreHttpsErrors- whether HTTPS certificate errors are ignoredblockServiceWorkers- whether service workers should be blockedloadStoragePath- storage-state input pathsaveStoragePath- storage-state output pathlanguage- locale/language hinttimezone- timezone hintproxyServer- proxy server URLproxyBypass- comma-separated proxy bypass listsaveHarPath- HAR output pathsaveHarGlob- HAR URL glob filtertimeout- maximum browser timeoutuserAgent- user-agent overrideuserDataDirectory- persistent browser profile directorysessionGoal- human-readable recording goalapiCapture- whether API network recording is enabled for this sessionnetworkOptions- network capture filtering options; ignored unlessapiCaptureis setsaveHarContent- HAR body-content emission mode: blank ornone(the default) keeps today's truncated network-trace preview bodies;fullemits 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 whenapiCapturewas 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordBrowser viewport dimensions. -
Constructor Summary
ConstructorsConstructorDescriptionCaptureStartOptions(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(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.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.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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theapiCapturerecord component.booleanReturns the value of theblockServiceWorkersrecord component.channel()Returns the value of thechannelrecord component.Returns the value of thecolorSchemerecord component.static CaptureStartOptionsdefaults()Returns default options.Returns the value of thedeviceNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeolocationrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreHttpsErrorsrecord component.language()Returns the value of thelanguagerecord component.Returns the value of theloadStoragePathrecord component.Returns the value of thenetworkOptionsrecord component.Returns the value of theproxyBypassrecord component.Returns the value of theproxyServerrecord component.Returns the value of thesaveHarContentrecord component.Returns the value of thesaveHarGlobrecord component.Returns the value of thesaveHarPathrecord component.Returns the value of thesaveStoragePathrecord component.Returns the value of thesessionGoalrecord component.Returns the value of thetargetLanguagerecord component.Returns the value of thetestIdAttributerecord component.Returns preferred test id attributes in locator-priority order.timeout()Returns the value of thetimeoutrecord component.timezone()Returns the value of thetimezonerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserAgentrecord component.Returns the value of theuserDataDirectoryrecord component.viewport()Parses the requested viewport.Returns the value of theviewportSizerecord component.warnings()Returns safe warnings for accepted-but-not-native Playwright codegen options.
-
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 beforesaveHarContentwas added (this was the canonical all-arguments constructor then).- Parameters:
targetLanguage- requested generation targettestIdAttribute- preferred test id attributechannel- Chromium channel hintdeviceName- device emulation hintviewportSize- viewport size aswidth,heightcolorScheme- preferred color scheme hintgeolocation- geolocation aslatitude,longitudeignoreHttpsErrors- whether HTTPS certificate errors are ignoredblockServiceWorkers- whether service workers should be blockedloadStoragePath- storage-state input pathsaveStoragePath- storage-state output pathlanguage- locale/language hinttimezone- timezone hintproxyServer- proxy server URLproxyBypass- comma-separated proxy bypass listsaveHarPath- HAR output pathsaveHarGlob- HAR URL glob filtertimeout- maximum browser timeoutuserAgent- user-agent overrideuserDataDirectory- persistent browser profile directorysessionGoal- human-readable recording goalapiCapture- whether API network recording is enabled for this sessionnetworkOptions- network capture filtering options; ignored unlessapiCaptureis 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 targettestIdAttribute- preferred test id attributechannel- Chromium channel hintdeviceName- device emulation hintviewportSize- viewport size aswidth,heightcolorScheme- preferred color scheme hintgeolocation- geolocation aslatitude,longitudeignoreHttpsErrors- whether HTTPS certificate errors are ignoredblockServiceWorkers- whether service workers should be blockedloadStoragePath- storage-state input pathsaveStoragePath- storage-state output pathlanguage- locale/language hinttimezone- timezone hintproxyServer- proxy server URLproxyBypass- comma-separated proxy bypass listsaveHarPath- HAR output pathsaveHarGlob- HAR URL glob filtertimeout- maximum browser timeoutuserAgent- user-agent overrideuserDataDirectory- persistent browser profile directorysessionGoal- human-readable recording goal
-
-
Method Details
-
defaults
-
testIdAttributes
-
viewport
Parses the requested viewport.- Returns:
- parsed viewport or
null
-
warnings
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
targetLanguage
Returns the value of thetargetLanguagerecord component.- Returns:
- the value of the
targetLanguagerecord component
-
testIdAttribute
Returns the value of thetestIdAttributerecord component.- Returns:
- the value of the
testIdAttributerecord component
-
channel
-
deviceName
Returns the value of thedeviceNamerecord component.- Returns:
- the value of the
deviceNamerecord component
-
viewportSize
Returns the value of theviewportSizerecord component.- Returns:
- the value of the
viewportSizerecord component
-
colorScheme
Returns the value of thecolorSchemerecord component.- Returns:
- the value of the
colorSchemerecord component
-
geolocation
Returns the value of thegeolocationrecord component.- Returns:
- the value of the
geolocationrecord component
-
ignoreHttpsErrors
public boolean ignoreHttpsErrors()Returns the value of theignoreHttpsErrorsrecord component.- Returns:
- the value of the
ignoreHttpsErrorsrecord component
-
blockServiceWorkers
public boolean blockServiceWorkers()Returns the value of theblockServiceWorkersrecord component.- Returns:
- the value of the
blockServiceWorkersrecord component
-
loadStoragePath
Returns the value of theloadStoragePathrecord component.- Returns:
- the value of the
loadStoragePathrecord component
-
saveStoragePath
Returns the value of thesaveStoragePathrecord component.- Returns:
- the value of the
saveStoragePathrecord component
-
language
-
timezone
-
proxyServer
Returns the value of theproxyServerrecord component.- Returns:
- the value of the
proxyServerrecord component
-
proxyBypass
Returns the value of theproxyBypassrecord component.- Returns:
- the value of the
proxyBypassrecord component
-
saveHarPath
Returns the value of thesaveHarPathrecord component.- Returns:
- the value of the
saveHarPathrecord component
-
saveHarGlob
Returns the value of thesaveHarGlobrecord component.- Returns:
- the value of the
saveHarGlobrecord component
-
timeout
-
userAgent
-
userDataDirectory
Returns the value of theuserDataDirectoryrecord component.- Returns:
- the value of the
userDataDirectoryrecord component
-
sessionGoal
Returns the value of thesessionGoalrecord component.- Returns:
- the value of the
sessionGoalrecord component
-
apiCapture
public boolean apiCapture()Returns the value of theapiCapturerecord component.- Returns:
- the value of the
apiCapturerecord component
-
networkOptions
Returns the value of thenetworkOptionsrecord component.- Returns:
- the value of the
networkOptionsrecord component
-
saveHarContent
Returns the value of thesaveHarContentrecord component.- Returns:
- the value of the
saveHarContentrecord component
-