@@ -723,6 +723,8 @@ def uc_open_with_cdp_mode(driver, url=None):
723723 cdp .wait_for_text = CDPM .wait_for_text
724724 cdp .wait_for_text_not_visible = CDPM .wait_for_text_not_visible
725725 cdp .wait_for_element_visible = CDPM .wait_for_element_visible
726+ cdp .wait_for_element_not_visible = CDPM .wait_for_element_not_visible
727+ cdp .wait_for_element_absent = CDPM .wait_for_element_absent
726728 cdp .assert_element = CDPM .assert_element
727729 cdp .assert_element_visible = CDPM .assert_element_visible
728730 cdp .assert_element_present = CDPM .assert_element_present
@@ -1628,9 +1630,19 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
16281630 ):
16291631 driver .uc_open_with_disconnect (driver .current_url , 3.8 )
16301632 with suppress (Exception ):
1633+ if "--debug" in sys .argv :
1634+ if sb_config ._saved_cf_tab_count == 1 :
1635+ print (' <DEBUG> pyautogui.press("\\ t")' )
1636+ else :
1637+ print (
1638+ ' <DEBUG> pyautogui.press("\\ t") * %s'
1639+ % sb_config ._saved_cf_tab_count
1640+ )
16311641 for i in range (sb_config ._saved_cf_tab_count ):
16321642 pyautogui .press ("\t " )
16331643 time .sleep (0.027 )
1644+ if "--debug" in sys .argv :
1645+ print (' <DEBUG> pyautogui.press(" ")' )
16341646 pyautogui .press (" " )
16351647 else :
16361648 driver .disconnect ()
@@ -2310,7 +2322,14 @@ def _set_chrome_options(
23102322 and not enable_3d_apis
23112323 ):
23122324 chrome_options .add_argument ("--disable-gpu" )
2313- if not IS_LINUX and is_using_uc (undetectable , browser_name ):
2325+ if (
2326+ (not IS_LINUX and is_using_uc (undetectable , browser_name ))
2327+ or (
2328+ IS_MAC
2329+ and binary_location
2330+ and "chrome-headless-shell" in binary_location
2331+ )
2332+ ):
23142333 chrome_options .add_argument ("--disable-dev-shm-usage" )
23152334 chrome_options .add_argument ("--disable-application-cache" )
23162335 if IS_LINUX :
0 commit comments