remark debug info.

master
Max 2023-09-28 17:41:35 +08:00 committed by GitHub
parent f2dbce875a
commit 0646592eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1566,7 +1566,7 @@ def tixcraft_home_close_window(driver, config_dict):
try: try:
accept_all_cookies_btn = driver.find_element(By.CSS_SELECTOR, '#onetrust-accept-btn-handler') accept_all_cookies_btn = driver.find_element(By.CSS_SELECTOR, '#onetrust-accept-btn-handler')
except Exception as exc: except Exception as exc:
print(exc) #print(exc)
if show_debug_message: if show_debug_message:
print("find accept_all_cookies_btn fail") print("find accept_all_cookies_btn fail")
pass pass
@ -1577,7 +1577,7 @@ def tixcraft_home_close_window(driver, config_dict):
if accept_all_cookies_btn.is_enabled() and accept_all_cookies_btn.is_displayed(): if accept_all_cookies_btn.is_enabled() and accept_all_cookies_btn.is_displayed():
is_visible = True is_visible = True
except Exception as exc: except Exception as exc:
print(exc) #print(exc)
pass pass
if is_visible: if is_visible:
@ -1586,7 +1586,7 @@ def tixcraft_home_close_window(driver, config_dict):
try: try:
accept_all_cookies_btn.click() accept_all_cookies_btn.click()
except Exception as exc: except Exception as exc:
print(exc) #print(exc)
print("try to click accept_all_cookies_btn fail, force click by js.") print("try to click accept_all_cookies_btn fail, force click by js.")
try: try:
driver.execute_script("arguments[0].click();", accept_all_cookies_btn) driver.execute_script("arguments[0].click();", accept_all_cookies_btn)