Ejemplo n.º 1
0
        public void CloseApp()
        {
            int count = 0;

            _mobile.SetTimeout(1);
            while (!_mobile.DoesScreenContains(new UiSelector().ResourceId("com.printeron.droid.phone:id/main_entry_function_panel")))
            {
                _mobile.PressKey(4);
                count++;
                if (count > 5)
                {
                    _mobile.ExecuteADBCommand($"shell am force-stop {PACKAGE_NAME}");
                    _mobile.SetTimeout(DEFAULT_TIMEOUT);
                    return;
                }
            }
            _mobile.SetTimeout(DEFAULT_TIMEOUT);
            _mobile.PressKey(4);
        }