Is it possible to force close an app on ios?

Hi,

Is it possible to force close an app on ios?

I need to perform a step where I close the app.

Thanks

appium driver has method responsible for this.

for example driver.close_app() in python

I meant if there is a way to close the application on ios just like the real user will do (press the home button twice and then after he sees all the open apps, he can swipe up the app he wants to close).

We are doing that on iOS simulator by mouse automation (pyautogui from pyobjectC library) + osascripts. In short:

  • we perform double home button click with osascript,

  • than swiping app window up with automated cursor (pyautogui).

Hard to say if there is easiest way.

Simiar to @stefan solution, you can activate AssistiveTouch on accessibility settings, then:

  1. Tap on Assistive touch asset
  2. Double tap on home asset
  3. Swipe up your app

All this with TouchAction

3 Likes

Hi Telmo
How do you find your app on the background? Is that also by absolute coordinate? I will be running multiple test apps and only needed to kill one of them.