Automate setting settings for iOS and Android possible?

4,142 views
Skip to first unread message

crimson

unread,
May 30, 2013, 2:58:54 PM5/30/13
to appium-...@googlegroups.com
As part of testing my application I need to automate changing some settings, is it possible using Appium?  For instance on an iOS device, I need to go to Settings>General>Profiles and install a certificate before my application starts.

Jonathan Lipps

unread,
May 30, 2013, 6:29:41 PM5/30/13
to crimson, appium-...@googlegroups.com
You can automate the settings app in appium. So your test could run two sessions: one automating the preferences app followed by one automating your app.

You can't automate two apps in one session however.

On May 30, 2013, at 11:58 AM, crimson <mkarl...@gmail.com> wrote:

As part of testing my application I need to automate changing some settings, is it possible using Appium?  For instance on an iOS device, I need to go to Settings>General>Profiles and install a certificate before my application starts.

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

crimson

unread,
May 30, 2013, 7:59:35 PM5/30/13
to appium-...@googlegroups.com, crimson
First of all thanks for your reply.  How would I launch the built in settings app on a real iOS device?  I notice most of the sample code references an app location for instances on Amazon S3.

Jonathan Lipps

unread,
May 30, 2013, 8:05:00 PM5/30/13
to crimson, appium-...@googlegroups.com
Simply pass in the bundle ID of the app you want to automate on the device in place of the path to the .app file.

crimson

unread,
May 30, 2013, 9:03:52 PM5/30/13
to appium-...@googlegroups.com, crimson
I am new to iOS.  How do I find the bundle id of the built in settings app? Any extra detail you can provide will probably save me quite a bit of time and is much appreciated!

Prashant Shewale

unread,
Jul 8, 2013, 8:01:00 AM7/8/13
to appium-...@googlegroups.com, crimson
Hi Jonalthan,


 >> Simply pass in the bundle ID of the app you want to automate on the device in place of the path to the .app file.
 Is there anything similar for android?

Jonathan Lipps

unread,
Jul 8, 2013, 1:20:33 PM7/8/13
to Prashant Shewale, appium-...@googlegroups.com, crimson
Yep. Simply omit --app, but include --app-package and --app-activity. This will run an app already on the device.

Prashant Shewale

unread,
Jul 8, 2013, 10:31:49 PM7/8/13
to Jonathan Lipps, crimson, appium-...@googlegroups.com

Great. Thanks a lot.

Scott Pruessing

unread,
Jan 27, 2014, 8:37:07 PM1/27/14
to appium-...@googlegroups.com, Jonathan Lipps, crimson
Hi Jonathan,
To echo what crimson said, is it possible to automate the Settings application in iOS on a real device? I am attempting to pass in the bundle id of apple apps (ex. com.apple.maps...) however I get an error that instruments is unable to locate CFBundleIdentifier for the path. Is it possible to automate the Settings application, and if so could you point me to an example or tell me the syntax? Thanks,
Scott

Scott Pruessing

unread,
Jan 29, 2014, 7:07:20 PM1/29/14
to appium-...@googlegroups.com, Jonathan Lipps, crimson
bump?

Jonathan Lipps

unread,
Jan 29, 2014, 7:17:21 PM1/29/14
to Scott Pruessing, appium-...@googlegroups.com, crimson
Yeah it's possible. Check out the tests for the settings application in our testsuite.

I'm also in the middle of checking in features that would allow setting most settings options with desired caps so you don't have to automate the settings app at all.

Scott Pruessing

unread,
Jan 29, 2014, 8:24:53 PM1/29/14
to appium-...@googlegroups.com, Scott Pruessing, crimson
Hi Jonathan,
Thanks for getting back to me. When I run the settings application tests in the testsuite (I am guessing this is prefs.js?) I am getting an error from Appium that it cannot find the application "settings" Here is the log:

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"app":"settings","device":"iPhone Simulator","launchTimeout":15000,"browserName":"firefox","version":"","javascriptEnabled":true,"platform":"ANY"}}
info: Got configuration error, not starting session
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Bad app passed in through desiredCaps: settings. Apps need to be absolute local path or URL to zip file
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created.","origValue":"Bad app passed in through desiredCaps: settings. Apps need to be absolute local path or URL to zip file"},"sessionId":null}

Is there any configuration I need to do to make this work on a real device on iOS? Thanks,
Scott

Jonathan Lipps

unread,
Jan 30, 2014, 1:36:35 PM1/30/14
to Scott Pruessing, appium-...@googlegroups.com, crimson
unfortunately you can't automate built-in apps on a real device. to automate any app on a real device it needs to be appropriately signed with your developer cert and so on.

Scott Pruessing

unread,
Jan 30, 2014, 1:40:10 PM1/30/14
to appium-...@googlegroups.com, Scott Pruessing, crimson
Ah ok. Thanks for clearing that up.

Artem Tykhonov

unread,
May 26, 2014, 11:35:43 AM5/26/14
to appium-...@googlegroups.com
Hi all,

does anybody knows how to run built-in apps with appium on iphone simulator?

 e.g: 
 capabilities.setCapability("app", PATH_TO_APP);

what should be in PATH_TO_APP variable?

Thanks.

Artem Tykhonov

unread,
May 30, 2014, 6:19:10 AM5/30/14
to appium-...@googlegroups.com
Thank you all for your replies.

In my case it was  capabilities.setCapability("app", "settings");

saheel ahamed

unread,
Jun 13, 2014, 8:12:55 AM6/13/14
to appium-...@googlegroups.com, sprue...@gmail.com, mkarl...@gmail.com
i am new to appium , trying to automate android settings app using python, setings app is launched but not able to serach developer option
there is no log in appium script just ends, help me in resolving the issue


from appium import webdriver

desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['deviceName'] = 'api19'
desired_caps['androidPackage'] ='com.android.settings'
desired_caps['appActivity'] ='com.android.settings.Settings'
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
self.driver.find_element_by_android_uiautomator('new UiSelector().description("Developer options")')
#el = self.driver.find_element_by_class_name("android.widget.LinearLayout")
el.click()

Isaac Murchie

unread,
Jun 13, 2014, 8:06:30 PM6/13/14
to saheel ahamed, appium-...@googlegroups.com, sprue...@gmail.com, mkarl...@gmail.com
First, your capabilities are a bit messy. Have a look at the docs: https://github.com/appium/appium/blob/master/docs/en/caps.md

Secondly, Android only has access to what is visible. So you will need to scroll down to find the Developer Options.

Third: I don't think "Developer Options" is the description. Try "text".


For more options, visit https://groups.google.com/d/optout.

Saimadhu G

unread,
Jul 17, 2014, 10:30:51 AM7/17/14
to appium-...@googlegroups.com, saheel...@gmail.com, sprue...@gmail.com, mkarl...@gmail.com
Hi Isaac,


Can u please provide the updated link?

Thanks
Madhu

Benjamin Bates

unread,
Jul 17, 2014, 11:02:56 AM7/17/14
to appium-...@googlegroups.com, saheel...@gmail.com, sprue...@gmail.com, mkarl...@gmail.com
Reply all
Reply to author
Forward
0 new messages