From f0020c5a23b1b70204608dd4ca4a5588501fef46 Mon Sep 17 00:00:00 2001 From: CHUN YU YAO Date: Fri, 4 Aug 2023 00:31:33 +0800 Subject: [PATCH] add timeout for execute script --- chrome_tixcraft.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 7045e82..8b9c6db 100644 --- a/chrome_tixcraft.py +++ b/chrome_tixcraft.py @@ -1474,6 +1474,7 @@ def force_press_button(driver, select_by, select_query, force_submit=True): if is_visible: try: + driver.set_script_timeout(1) driver.execute_script("arguments[0].click();", next_step_button) ret = True except Exception as exc: @@ -6323,6 +6324,7 @@ def facebook_login(driver, account, password): is_password_sent = True time.sleep(0.1) except Exception as exc: + print(exc) pass ret = is_password_sent