**OS **OSX High Sierra
Katalon Studio Version 5.2
## Environment (for Mobile testing)
* Appium version 1.7.1
* Mobile platform/version under test iOS 11.2
* Simulator iPhone 5S
* Xcode version (for iOS) Xcode 9.2
## Steps to reproduce -
Launch your app with Mobile.startApplication (appPath, TRUE )
Close your app with Mobile.closeApplication()
## Expected Behavior -
I am expected to have the app uninstalled when I close it: https://docs.katalon.com/display/KD/[Mobile]+Start+Application
## Actual Behavior -
App is closed but still not installed. I need to have a way to uninstall my app without restarting the sim. Moreover solution has to work also on real devices
quentin said:
**OS **OSX High Sierra
Katalon Studio Version 5.2
## Environment (for Mobile testing)
* Appium version 1.7.1
* Mobile platform/version under test iOS 11.2
* Simulator iPhone 5S
* Xcode version (for iOS) Xcode 9.2
## Steps to reproduce -
Launch your app with Mobile.startApplication (appPath, TRUE )
Close your app with Mobile.closeApplication()
## Expected Behavior -
I am expected to have the app uninstalled when I close it: https://docs.katalon.com/display/KD/[Mobile]+Start+Application
## Actual Behavior -
App is closed but still not installed. I need to have a way to uninstall my app without restarting the sim. Moreover solution has to work also on real devices
I notice when you pass TRUE value into ‘Start Application’ keyword, it will set fullReset capabilities to true:
## Appium server capabilities
<expand_table>
|Capability|Description|Values|
|----|-----------|-------|
|`automationName`|Which automation engine to use|`Appium` (default) or `Selendroid`|
|`platformName`|Which mobile OS platform to use|`iOS`, `Android`, or `FirefoxOS`|
|`platformVersion`|Mobile OS version|e.g., `7.1`, `4.4`|
|`deviceName`|The kind of mobile device or emulator to use|`iPhone Simulator`, `iPad Simulator`, `iPhone Retina 4-inch`, `Android Emulator`, `Galaxy S4`, etc.... On iOS, this should be one of the valid devices returned by instruments with `instruments -s devices`. On Android this capability is currently ignored.|
|`app`|The absolute local path _or_ remote http URL to an `.ipa` or `.apk` file, or a `.zip` containing one of these. Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if you specify `appPackage` and `appActivity` capabilities (see below). Incompatible with `browserName`.|`/abs/path/to/my.apk` or `http://myapp.com/app.ipa`|
|`browserName`|Name of mobile web browser to automate. Should be an empty string if automating an app instead.|'Safari' for iOS and 'Chrome', 'Chromium', or 'Browser' for Android|
|`newCommandTimeout`|How long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the session|e.g. `60`|
|`language`| (Sim/Emu-only) Language to set for the simulator / emulator |e.g. `fr`|
|`locale`| (Sim/Emu-only) Locale to set for the simulator / emulator |e.g. `fr_CA`|
|`udid`| Unique device identifier of the connected physical device|e.g. `1ae203187fc012g`|
|`orientation`| (Sim/Emu-only) start in a certain orientation|`LANDSCAPE` or `PORTRAIT`|
|`autoWebview`| Move directly into Webview context. Default `false`|`true`, `false`|
|`noReset`|Don't reset app state before this session. Default `false`|`true`, `false`|
|`fullReset`|(iOS) Delete the entire simulator folder. (Android) Reset app state by uninstalling app instead of clearing app data. On Android, this will also remove the app after the session is complete. Default `false`|`true`, `false`|
This file has been truncated. show original
As described in this document, fullReset does not work for REAL device, so you can’t uninstall your app automatically using real iOS device
1 Like
quentin
January 10, 2018, 10:30am
3
Thanks for the info for real devices, but what about simulators? When I close the app, it is not uninstalling the app either.
# Reset Strategies
| Automation Name | default | fullReset | noReset |
| --------------- | ------- | --------- | ------- |
| iOS (including XCUITest) | Shut down sim after test. Do not destroy sim. Do not uninstall app from real device. | Uninstall app after real device test, destroy Simulator after sim test | Do not destroy or shut down sim after test. Start tests running on whichever sim is running, or device is plugged in |
| Android | Stop and clear app data after test. Do not uninstall apk | Stop app, clear app data and uninstall apk after test | Do not stop app, do not clear app data, and do not uninstall apk. |
This explains much better: It will destroy your sim
quentin
January 10, 2018, 10:45am
5
Ok I see, I tried also to implement an after hook with removeApp method, but app was not removed, but I found the bug ticket in appium side: https://github.com/appium/appium/issues/9940
I guess we can close this ticket!
Thanks!
This still works inconsistently between iOS and Android - I don’t think that Appium can make a change to the underlying way that iOS apps are installed.
The Katalon documentation for startApplication should be updated to reflect the different behavior on iOS.
As a workaround, I wrote a library that tries to make uninstalling/clearing an app more consistent between iOS and Android (still can’t uninstall from iOS reliably, but you can clear the data):
https://github.com/detroit-labs/katalon-mobile-util#how-to-use-device
This gives the testers control over whether the app is cleared before the tests run or after (or both).