Android new Capability (userProfile)

63 views
Skip to first unread message

Vinod Benure

unread,
Feb 21, 2018, 1:39:56 AM2/21/18
to appium-developers
Hi

I am trying to add new capability(user profile) for Android. This capability is related to the appium issue. However I need help in below issues:

1. The idea is to make this capability as optional.

2. I have added the new capability 'userProfile'  in "desired-caps.js" of appium-android-driver package.
        userProfile: {
isNumber: true
},

3. If user specifies this capability then this capability value should be added to defaultArgs of executable so that each and every adb command goes with this parameter.

    For eg. executable.defaultArgs.push("-u", opts.userProfile);

4. However, I want to make sure that this capability is added only if the the user profile available on the device. We can get the list of available users by using below adb command.
            adb shell pm list users

    Once we get the list of users and we can parse the values from output of the above command.

5. If the user profile is not available on the device then we can initialize the device with the traditional way without using this capability.

6. I am little confused about where add the this piece of code to. Whether to add this to "driver.js", "android-helpers.js" of appium-android-driver package or  add this to "system-calls.js" of appium-adb package .

Waiting for suggestions



Reply all
Reply to author
Forward
0 new messages