From 6156bc7bb3a81003c5439cd97ec610f25bad068b Mon Sep 17 00:00:00 2001 From: Victor Phan Date: Tue, 21 Jul 2026 09:58:34 +0700 Subject: [PATCH] feat: add automation module for background task handling --- serverPython/automation.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/serverPython/automation.py b/serverPython/automation.py index 88fafb6..68b81eb 100644 --- a/serverPython/automation.py +++ b/serverPython/automation.py @@ -43,12 +43,20 @@ class ShopeeBot: time.sleep(6) # Mục này có thể tải hơi lâu vì gọi API - # 5. Ấn tab "Chuyển đổi" ở thanh menu dưới cùng - print("Vào tab Chuyển đổi...") - if self.d(text="Chuyển đổi").exists: - self.d(text="Chuyển đổi").click() + # 5. Ấn tab "Tài khoản" ở thanh menu dưới cùng của Affiliate + print("Vào tab Tài khoản...") + if self.d(text="Tài khoản").exists: + self.d(text="Tài khoản").click() else: - return "Lỗi: Không tìm thấy tab Chuyển đổi" + return "Lỗi: Không tìm thấy tab Tài khoản" + time.sleep(2) + + # 5.1. Bấm vào "Chuyển đổi liên kết" trong danh sách + print("Bấm vào mục Chuyển đổi liên kết...") + if self.d(text="Chuyển đổi liên kết").exists: + self.d(text="Chuyển đổi liên kết").click() + else: + return "Lỗi: Không tìm thấy mục Chuyển đổi liên kết" time.sleep(2) # 6. Nhập link vào ô Text