question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

processArguments not being sent to app iOS10

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Sep 26, 2016

I would say you should add more logging to your app under test to see what it receives as arguments.

1reaction
mykola-mokhnachcommented, Sep 23, 2016

I do it like this and it works so far:

        final List<String> processArgs = new ArrayList<>(Arrays.asList(
                "--disable-autocorrection"
                ,"--debug-log-network"
        ));
        final JSONObject argsValue = new JSONObject();
        argsValue.put("args", processArgs);
        capabilities.setCapability("processArguments", argsValue.toString());
Read more comments on GitHub >

github_iconTop Results From Across the Web

processArguments not being sent to iOS App - Appium Discuss
Hello, I'm trying to send processArguments using caps by adding : processArguments: {“AppUnderTest”: true} On the iOS app side I don't get ...
Read more >
Share analytics, diagnostics, and usage information with Apple
If you have iOS 10 to iOS 10.2, go to Settings > Privacy > Diagnostics & Usage and select Automatically Send or Don't...
Read more >
Supported Appium capabilities - Perfecto Help
Use XCUITest if automating iOS 10 or later native applications. ... If not set and the device is running a non-iOS OS, the...
Read more >
How can my iOS app know Appium is running it?
You can use the processArguments capability to pass application launch arguments through Appium to your application. Inside your application ...
Read more >
Articles Which versions of iOS does Duo Mobile support?
This end-of-support milestone is not an end-of-life for our application on devices ... If you are running iOS 10 and you are not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found