Observed behavior:
Whenever running a test script which uses keyword Mobile.startExistingApplication Katalon Studio fails to execute the keyword Mobile.closeApplication()
The log says “Close app successfully” but the app remains open on the last screen before Mobile.closeApplication() was executed.
I was able to reproduce this behavior on devices running on Android 8, 9 and 10.
I’ve also tested with several versions of Katalon Studio (7.1.2 and 8.0.0).
Test was executed on:
WIN 10 build 1903
Appium 1.14.0
Keep in mind this behavior only occurs when using keyword Mobile.startExistingApplication, when using keyword Mobile.startApplication the app is closed correctly after Mobile.closeApplication() is executed.
Expected behavior:
Existing app is closed after keyword Mobile.closeApplication() is executed.
The Bug still exist on latest version of Katalon Studio version 8.1.0, as the close application doesn’t work and the start application doesn’t start with new session
I try with your above steps and see that the keyword Mobile.closeApplication(FailureHandling.STOP_ON_FAILURE) does NOT close the application after open the application. However, I found a way to close the application and it works from my side:
Steps
Import need package: This package is used to get appium driver from Katalon
import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory
Get current driver after open app:
Mobile.startExistingApplication(‘com.dencreak.dlcalculator’)
driver = MobileDriverFactory.getDriver()
3.Perform your steps with automation:
// your customize
4.Quit your app by below comment
driver.resetApp()