Record Class McpMobileInitOptions
java.lang.Object
java.lang.Record
com.shaft.mcp.McpMobileInitOptions
- Record Components:
targetUrl- web-emulation only: initial URL; blank leaves the browser on its startup pagebrowser- web-emulation only: browser name, defaults to CHROMEdeviceName- web-emulation: Chrome/Edge emulated device name, defaults to Pixel 5; native: emulator, simulator, or real device namewidth- web-emulation only: custom device width; requires heightheight- web-emulation only: custom device height; requires widthpixelRatio- web-emulation only: custom device pixel ratiouserAgent- web-emulation only: optional custom mobile user agentheadless- web-emulation only: whether the emulated browser should run headlesslyplatformName- native only: Android or iOSappiumServerUrl- native only: Appium server URL; blank defaults to http://127.0.0.1:4723automationName- native only: Appium automation name; blank selects UiAutomator2/XCUITestplatformVersion- native only: optional platform versionudid- native only: optional device UDIDapp- native only: optional app path or remote app URLappPackage- native only: optional Android app packageappActivity- native only: optional Android app activitybundleId- native only: optional iOS bundle identifier for installed apps
public record McpMobileInitOptions(String targetUrl, String browser, String deviceName, Integer width, Integer height, Double pixelRatio, String userAgent, Boolean headless, String platformName, String appiumServerUrl, String automationName, String platformVersion, String udid, String app, String appPackage, String appActivity, String bundleId)
extends Record
Optional nested mobile-session request object accepted by
driver_initialize when
engine selects ActiveEngine.MOBILE_NATIVE or ActiveEngine.MOBILE_WEB
(design doc amendment A9): carries the union of the former mobile_initialize_native and
mobile_initialize_web_emulation tools' parameters. Every field is optional; unset fields
resolve from SHAFT.Properties exactly as the current mobile init tools do (blank/zero
values are passed straight through to MobileService.initializeNative(String, String, String, String, String, String, String, String, String, String)/
MobileService.initializeWebEmulation(String, String, String, int, int, double, String, boolean), which already default them internally).-
Constructor Summary
ConstructorsConstructorDescriptionMcpMobileInitOptions(String targetUrl, String browser, String deviceName, Integer width, Integer height, Double pixelRatio, String userAgent, Boolean headless, String platformName, String appiumServerUrl, String automationName, String platformVersion, String udid, String app, String appPackage, String appActivity, String bundleId) Creates an instance of aMcpMobileInitOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapp()Returns the value of theapprecord component.Returns the value of theappActivityrecord component.Returns the value of theappiumServerUrlrecord component.Returns the value of theappPackagerecord component.Returns the value of theautomationNamerecord component.browser()Returns the value of thebrowserrecord component.bundleId()Returns the value of thebundleIdrecord component.Returns the value of thedeviceNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headless()Returns the value of theheadlessrecord component.height()Returns the value of theheightrecord component.Returns the value of thepixelRatiorecord component.Returns the value of theplatformNamerecord component.Returns the value of theplatformVersionrecord component.Returns the value of thetargetUrlrecord component.final StringtoString()Returns a string representation of this record class.udid()Returns the value of theudidrecord component.Returns the value of theuserAgentrecord component.width()Returns the value of thewidthrecord component.
-
Constructor Details
-
McpMobileInitOptions
public McpMobileInitOptions(@ToolParam(required=false) String targetUrl, @ToolParam(required=false) String browser, @ToolParam(required=false) String deviceName, @ToolParam(required=false) Integer width, @ToolParam(required=false) Integer height, @ToolParam(required=false) Double pixelRatio, @ToolParam(required=false) String userAgent, @ToolParam(required=false) Boolean headless, @ToolParam(required=false) String platformName, @ToolParam(required=false) String appiumServerUrl, @ToolParam(required=false) String automationName, @ToolParam(required=false) String platformVersion, @ToolParam(required=false) String udid, @ToolParam(required=false) String app, @ToolParam(required=false) String appPackage, @ToolParam(required=false) String appActivity, @ToolParam(required=false) String bundleId) Creates an instance of aMcpMobileInitOptionsrecord class.- Parameters:
targetUrl- the value for thetargetUrlrecord componentbrowser- the value for thebrowserrecord componentdeviceName- the value for thedeviceNamerecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentpixelRatio- the value for thepixelRatiorecord componentuserAgent- the value for theuserAgentrecord componentheadless- the value for theheadlessrecord componentplatformName- the value for theplatformNamerecord componentappiumServerUrl- the value for theappiumServerUrlrecord componentautomationName- the value for theautomationNamerecord componentplatformVersion- the value for theplatformVersionrecord componentudid- the value for theudidrecord componentapp- the value for theapprecord componentappPackage- the value for theappPackagerecord componentappActivity- the value for theappActivityrecord componentbundleId- the value for thebundleIdrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
targetUrl
-
browser
-
deviceName
Returns the value of thedeviceNamerecord component.- Returns:
- the value of the
deviceNamerecord component
-
width
-
height
-
pixelRatio
Returns the value of thepixelRatiorecord component.- Returns:
- the value of the
pixelRatiorecord component
-
userAgent
-
headless
-
platformName
Returns the value of theplatformNamerecord component.- Returns:
- the value of the
platformNamerecord component
-
appiumServerUrl
Returns the value of theappiumServerUrlrecord component.- Returns:
- the value of the
appiumServerUrlrecord component
-
automationName
Returns the value of theautomationNamerecord component.- Returns:
- the value of the
automationNamerecord component
-
platformVersion
Returns the value of theplatformVersionrecord component.- Returns:
- the value of the
platformVersionrecord component
-
udid
-
app
-
appPackage
Returns the value of theappPackagerecord component.- Returns:
- the value of the
appPackagerecord component
-
appActivity
Returns the value of theappActivityrecord component.- Returns:
- the value of the
appActivityrecord component
-
bundleId
-