My device has a small RAM capacity and when too many apps are open, it starts to slow down and disturbs the execution of my script.
So I would like to close all the apps open on my smartphone before running my automation script.
So my idea was to get the list of all apps open on the device and then kill them one by one with the command:
driver.terminate_app(‘PACKAGE_NAME’)
But I didn’t find how to get a list of the open apps on a device.