From dde8ac03370ec6f845ccbf5ed67e06c3b05f4e0a Mon Sep 17 00:00:00 2001 From: Victor Phan Date: Tue, 21 Jul 2026 11:14:42 +0700 Subject: [PATCH] feat: add automation module for background task handling --- serverPython/automation.py | 5 +++++ 1 file changed, 5 insertions(+) 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")