I’d like to pass some initial parameters to the iOS app to do some additional work for testing on the app side. I guess AppDelegate’s didFinishLaunchingWithOptions:
is the best place and I thought it can be done by setting processArguments
capability on the appium side according to this thread. However it doesn’t work and launchOptions
is always nil. What am I missing?
processArguments
I set looks like this:
"processArguments": {"args" : ["a", "b"], "env" : {"c":"d"}}
The log on the appium server looks like this:
[debug] e[35m[BaseDriver]e[39m W3C capabilities and MJSONWP desired capabilities were provided
[debug] e[35m[BaseDriver]e[39m Creating session with W3C capabilities: {
[debug] e[35m[BaseDriver]e[39m "alwaysMatch": {
[debug] e[35m[BaseDriver]e[39m "platformName": "iOS",
[debug] e[35m[BaseDriver]e[39m "appium:appPackage": "com.myapp",
[debug] e[35m[BaseDriver]e[39m "appium:bundleId": "com.myapp",
[debug] e[35m[BaseDriver]e[39m "appium:xcodeOrgId": "***",
[debug] e[35m[BaseDriver]e[39m "appium:xcodeSigningId": "iPhone Developer",
[debug] e[35m[BaseDriver]e[39m "appium:name": "***",
[debug] e[35m[BaseDriver]e[39m "appium:automationName": "XCUITest",
[debug] e[35m[BaseDriver]e[39m "appium:processArguments": {
[debug] e[35m[BaseDriver]e[39m "args": [
[debug] e[35m[BaseDriver]e[39m "a",
[debug] e[35m[BaseDriver]e[39m "b"
[debug] e[35m[BaseDriver]e[39m ],
[debug] e[35m[BaseDriver]e[39m "env": {
[debug] e[35m[BaseDriver]e[39m "c": "d"
[debug] e[35m[BaseDriver]e[39m }
[debug] e[35m[BaseDriver]e[39m },
[debug] e[35m[BaseDriver]e[39m "appium:deviceName": "iPhone 8 Plus",
[debug] e[35m[BaseDriver]e[39m "appium:udid": "00003ADB-A875-4226-A120-ADAEE590D25E",
[debug] e[35m[BaseDriver]e[39m "appium:platformVersion": "14.2"
[debug] e[35m[BaseDriver]e[39m },
[debug] e[35m[BaseDriver]e[39m "firstMatch": [
[debug] e[35m[BaseDriver]e[39m {}
[debug] e[35m[BaseDriver]e[39m ]
[debug] e[35m[BaseDriver]e[39m }
- Platform you are automating (iOS or Android): iOS (React Native)
- Appium version: v1.19.0
- Simulator/Emulator or Real Device: Simulator
- The language you are using for writing tests (client binding): Python
- Your OS: macOS 10.15.7