I’ve tried that method using both the arguments method and the environment method. But it doesn’t seem like the variables are being passed.
Arguments Method
JSONObject argsValue = new JSONObject();
List processArgs = new ArrayList();
processArgs.add(“first sign in”);
processArgs.add(“true”);
processArgs.add(“first onscreen time”);
processArgs.add(“true”);
argsValue.put(“args”, processArgs);
desiredCapabilities.setCapability(“processArguments”, argsValue.toString());
Environments Method
JSONObject argsValue = new JSONObject();
Map<String, Object> processEnv = new HashMap<>();
processEnv.put(“first sign in”, “true”);
processEnv.put(“first onscreen time”, “true”);
argsValue.put(“env”, processEnv);
desiredCapabilities.setCapability(“processArguments”, argsValue.toString());
“first sign in” and “first onscreen time” are the names of the “keys” that are in the app I am testing. I’m not sure if the spaces between the keys could be causing the issue.
Setup
- Appium Server v1.7.2
- Testing real device iPhone 6S running iOS v11.4.1