feat: add automation module for background task handling

This commit is contained in:
Victor Phan
2026-07-21 09:58:34 +07:00
parent 97ddcd2699
commit 6156bc7bb3
+13 -5
View File
@@ -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