processArguments not being sent to app iOS10
See original GitHub issueThe problem
I am using processArguments, but the app is not getting that information on startup.
Environment
- Appium version (or git revision) that exhibits the issue: Appium v1.6.0-beta2 (REV 9441a89f7e368f0c621db3a0cf9ab074c045ac3a)
- Last Appium version that did not exhibit the issue (if applicable): 1.4
- Desktop OS/version used to run Appium: MacOS 10.11.6
- Node.js version: 5.4.1
- Mobile platform/version under test: iOS10 iPhone 6s
- Real device or emulator/simulator: Simulator
- Appium CLI or Appium.app|exe: CLI
Details
The emulator does start, and the app launches, but the app logs tell me that the launchArguments are not being passed to the app. I am not sure if the arguments are being passed by WDA or not.
Link to Appium logs
https://gist.github.com/kalawton/c89ba1428e8923b8f4032a227b41cf0d
Code To Reproduce Issue [ Good To Have ]
` String[] baseURL = {"-baseURL "+MobileProperties.getProperty(“selected.environment”)}; JSONObject arguments = new JSONObject(); arguments.put(“args”, baseURL);
desiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(“automationName”, “XCUITest”); capabilities.setCapability(“platformName”, “iOS”); capabilities.setCapability(“platformVersion”, iOS_VERSION); capabilities.setCapability(“deviceName”, iOS_DEVICE); capabilities.setCapability(“app”, appPath); capabilities.setCapability(“autoLaunch”, true); capabilities.setCapability(“autoAcceptAlerts”, true); capabilities.setCapability(“sendKeyStrategy”, “grouped”); capabilities.setCapability(“processArguments”, arguments) ; capabilities.setCapability(“language”, iOS_Language); capabilities.setCapability(“locale”, iOS_REGION); capabilities.setCapability(“fullReset”, true); `
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (3 by maintainers)
Top GitHub Comments
I would say you should add more logging to your app under test to see what it receives as arguments.
I do it like this and it works so far: