feat: implement Facebook automation bot with comment and image attachment capabilities
This commit is contained in:
@@ -149,8 +149,11 @@ class FacebookBot:
|
||||
logging.info("Thoát ra màn hình chính (Homescreen)...")
|
||||
self.d.press("home")
|
||||
|
||||
def dump_ui_for_debug(self, filename: str):
|
||||
xml_dump = self.d.dump_hierarchy()
|
||||
with open(filename, "w", encoding="utf-8") as f:
|
||||
f.write(xml_dump)
|
||||
logging.error(f"Đã lưu giao diện lỗi vào file {filename}")
|
||||
def dump_ui_for_debug(self, filename="ui_dump.xml"):
|
||||
import os
|
||||
os.makedirs("xml_ui", exist_ok=True)
|
||||
filepath = os.path.join("xml_ui", filename)
|
||||
xml_content = self.d.dump_hierarchy()
|
||||
with open(filepath, "w", encoding="utf-8") as f:
|
||||
f.write(xml_content)
|
||||
logging.info(f"Đã lưu cấu trúc UI hiện tại ra file {filepath} để debug.")
|
||||
|
||||
Reference in New Issue
Block a user