# Change an apps settings in the Settings app and then navigate back to the app

**URL:** <https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054>\
**Category:** Support\
**Created:** [April 18, 2017, 9:33am UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054 "2017-04-18T09:33:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmck91](https://discuss.appium.io/user_avatar/discuss.appium.io/pmck91/32/2605_2.png) [@pmck91](https://discuss.appium.io/u/pmck91)\
**Post date:** [April 18, 2017, 9:33am UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054/1 "2017-04-18T09:33:31Z")

</div>

Hi guys/gals,

I need to set some settings for the app under test on iOS. I have been doing this by navigating to the settings app, changing the setting, quitting the driver, starting the driver pointing at the app to test.

The problem seems to be that settings are not being saved when I close the settings app. If I reopen the settings app manually none of the selected options are set.

I have noReset: true in my capabilities file, and I make sure the application is installed before setting the settings.

Any help much appreciated, I’ve been stuck on this for too many hours.

---

<div class="post-metadata">

**Author:** ![amitjaincoer191](https://discuss.appium.io/user_avatar/discuss.appium.io/amitjaincoer191/32/5339_2.png) [@amitjaincoer191](https://discuss.appium.io/u/amitjaincoer191)\
**Post date:** [April 18, 2017, 1:35pm UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054/2 "2017-04-18T13:35:09Z")

</div>

In iOS platform using appium you cannot go out of test app and perform any action. I believe this may be because of apple restrictions.

In android platform it works by starting a new activity and then minimize it.

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 18, 2017, 1:39pm UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054/3 "2017-04-18T13:39:16Z")

</div>

@amitjaincoer191 for iOS you CAN got to settings BUT on Simulator only 🙂

---

<div class="post-metadata">

**Author:** ![amitjaincoer191](https://discuss.appium.io/user_avatar/discuss.appium.io/amitjaincoer191/32/5339_2.png) [@amitjaincoer191](https://discuss.appium.io/u/amitjaincoer191)\
**Post date:** [April 18, 2017, 1:41pm UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054/4 "2017-04-18T13:41:36Z")

</div>

Thanks. Any pointers how to do for simulator ?  
Is this feature was present in earlier versions of appium also like 1.3.4/1.4 ?

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 18, 2017, 1:44pm UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054/5 "2017-04-18T13:44:17Z")

</div>

@amitjaincoer191 it was always. i used it and press Home button and open settings (we changed some app settings before test).  
@pmck91 later to return in same session to client i did:

```auto
try {driver.runAppInBackground(1)} catch (Exception e) {}

```

---

<div class="post-metadata">

**Author:** ![amitjaincoer191](https://discuss.appium.io/user_avatar/discuss.appium.io/amitjaincoer191/32/5339_2.png) [@amitjaincoer191](https://discuss.appium.io/u/amitjaincoer191)\
**Post date:** [April 18, 2017, 1:51pm UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054/6 "2017-04-18T13:51:17Z")

</div>

Ok. But I learnt that pressKeyCode(KEYS.ANDROID\_HOME) method works only on android platform for pressing any specific key.

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 18, 2017, 1:58pm UTC](https://discuss.appium.io/t/change-an-apps-settings-in-the-settings-app-and-then-navigate-back-to-the-app/16054/7 "2017-04-18T13:58:11Z")

</div>

@amitjaincoer191 i press Home with the help of osascript.

> [@How to close ios simulator after running the test](https://discuss.appium.io/t/how-to-close-ios-simulator-after-running-the-test/5828):
>
> I have written following code in order to start the appium server and close the server after test case execution completed.however starting server works fine, closing does not work. AppiumDriver driver; CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node"); command.addArgument("/Applications/Appium.app/Contents/Resources/node\_modules/appium/bin/appium.js", false); command.addArgument("--address", false); command.addArgument("127.0.0.1"); comman…
