diff --git a/serverPython/facebook_bot.py b/serverPython/facebook_bot.py index 76f506e..31a100d 100644 --- a/serverPython/facebook_bot.py +++ b/serverPython/facebook_bot.py @@ -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.") diff --git a/serverPython/fb_step1_open_group.xml b/serverPython/fb_step1_open_group.xml deleted file mode 100644 index 8f12997..0000000 --- a/serverPython/fb_step1_open_group.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/serverPython/xml_ui/fb_step1_open_group.xml b/serverPython/xml_ui/fb_step1_open_group.xml index 01427a7..c7231ee 100644 --- a/serverPython/xml_ui/fb_step1_open_group.xml +++ b/serverPython/xml_ui/fb_step1_open_group.xml @@ -22,7 +22,7 @@ - + @@ -107,19 +107,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -150,8 +150,8 @@ - - + +