Skip to content

Commit d8b4447

Browse files
committed
Fix an issue with UC Mode
1 parent 6a05791 commit d8b4447

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,10 @@ def _uc_gui_click_captcha(
989989
reconnect_time = 1 # Make it quick (it already failed)
990990
driver.reconnect(reconnect_time)
991991
caught = False
992-
if driver.is_element_present(".footer .clearfix .ray-id"):
992+
if (
993+
driver.is_element_present(".footer .clearfix .ray-id")
994+
and not driver.is_element_present("#challenge-success-text")
995+
):
993996
blind = True
994997
caught = True
995998
if blind:
@@ -1209,7 +1212,10 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
12091212

12101213
def _uc_gui_handle_captcha(driver, frame="iframe", ctype=None):
12111214
_uc_gui_handle_captcha_(driver, frame=frame, ctype=ctype)
1212-
if driver.is_element_present(".footer .clearfix .ray-id"):
1215+
if (
1216+
driver.is_element_present(".footer .clearfix .ray-id")
1217+
and not driver.is_element_present("#challenge-success-text")
1218+
):
12131219
driver.uc_open_with_reconnect(driver.current_url, 3.8)
12141220
_uc_gui_handle_captcha_(driver, frame=frame, ctype=ctype)
12151221

0 commit comments

Comments
 (0)