diff --git a/serverPython/automation.py b/serverPython/automation.py index 675b350..3f6b2fb 100644 --- a/serverPython/automation.py +++ b/serverPython/automation.py @@ -141,3 +141,8 @@ class ShopeeBot: except Exception as e: return {"status": "error", "message": f"Lỗi không xác định: {str(e)}"} + + finally: + # Luôn thoát ra màn hình chính (Homescreen) sau khi lấy xong (hoặc lỗi) + logging.info("Thoát ra màn hình chính (Homescreen)...") + self.d.press("home")