Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds an iOS-specific driver/helper API for executing mobile: launchApp with process arguments and environment variables, and introduces an integration test to validate launching UICatalog via the new method.
Changes:
- Added
IOSDriver.LaunchAppWithArgumentsconvenience method. - Implemented
IOSCommandExecutionHelper.LaunchAppWithArgumentsto execute the underlyingmobile: launchAppscript with args/env. - Added an iOS integration test
CanLaunchAppWithArgumentsusing the installed UICatalog bundle id.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/integration/IOS/Device/AppTests.cs | Adds an integration test that terminates and relaunches UICatalog with arguments/env and verifies foreground state + an element lookup. |
| src/Appium.Net/Appium/iOS/IOSDriver.cs | Exposes a new public driver method delegating to the iOS command execution helper. |
| src/Appium.Net/Appium/iOS/IOSCommandExecutionHelper.cs | Adds the execute-script implementation for mobile: launchApp with optional arguments and environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| executeMethod.Execute(DriverCommand.ExecuteScript, new Dictionary<string, object> | ||
| { | ||
| ["script"] = "mobile:launchApp", |
There was a problem hiding this comment.
The script name uses "mobile:launchApp" (no space) while the XML docs and other app-management helpers in this codebase use the spaced form (e.g., "mobile: installApp"). Aligning the script string with the documented command name ("mobile: launchApp") would avoid confusion and reduce the risk of incompatibility with servers that expect the canonical format.
| ["script"] = "mobile:launchApp", | |
| ["script"] = "mobile: launchApp", |
| public static void LaunchAppWithArguments( | ||
| IExecuteMethod executeMethod, | ||
| string bundleId, | ||
| IReadOnlyCollection<string> processArguments = null, |
There was a problem hiding this comment.
Command-line arguments are inherently ordered. Using IReadOnlyCollection for processArguments allows unordered implementations (e.g., HashSet), which could scramble argument order when serialized. Consider changing this to IReadOnlyList (or IEnumerable but documented as ordered) to better represent the required semantics.
| IReadOnlyCollection<string> processArguments = null, | |
| IReadOnlyList<string> processArguments = null, |
| /// <param name="environmentVariables">Optional environment variables for the app.</param> | ||
| public void LaunchAppWithArguments( | ||
| string bundleId, | ||
| IReadOnlyCollection<string> processArguments = null, |
There was a problem hiding this comment.
Command-line arguments are inherently ordered. Using IReadOnlyCollection for processArguments allows unordered implementations (e.g., HashSet), which could scramble argument order when serialized. Consider changing this to IReadOnlyList (or another ordered type) to reflect the expected semantics.
| IReadOnlyCollection<string> processArguments = null, | |
| IReadOnlyList<string> processArguments = null, |
Summary
Testing