App is not closing during appium session in Simulator

408 Views Asked by At

Failed to close app in simulator at the time of mobile test execution

Tried driver.closeApp() command . Also tried exit with code Zero.

1

There are 1 best solutions below

0
On BEST ANSWER

While Appium Session is running a default capability is passed in logs. check in logs shouldTerminatApp if it is false.

In the base class mention the following:

DesiredCapabilities dc= new DesiredCapabilities(); dc.dc.setCapability("shouldTerminateApp",true);