Merge pull request #3127 from seleniumbase/a-fix-an-update-and-dependencies
A fix, an update, and dependencies
This commit is contained in:
commit
a74b443501
|
@ -48,7 +48,7 @@ WAIT_FOR_RSC_ON_PAGE_LOADS = True
|
|||
# Called after self.click(selector), NOT element.click()
|
||||
WAIT_FOR_RSC_ON_CLICKS = False
|
||||
# Wait for AngularJS calls to complete after various browser actions.
|
||||
WAIT_FOR_ANGULARJS = False
|
||||
WAIT_FOR_ANGULARJS = True
|
||||
# Skip ALL calls to wait_for_ready_state_complete() and wait_for_angularjs().
|
||||
SKIP_JS_WAITS = False
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ six==1.16.0
|
|||
idna==3.8
|
||||
chardet==5.2.0
|
||||
charset-normalizer==3.3.2
|
||||
urllib3>=1.26.19,<2;python_version<"3.10"
|
||||
urllib3>=1.26.19,<2.3.0;python_version>="3.10"
|
||||
urllib3>=1.26.20,<2;python_version<"3.10"
|
||||
urllib3>=1.26.20,<2.3.0;python_version>="3.10"
|
||||
requests==2.31.0
|
||||
pynose==1.5.2
|
||||
sniffio==1.3.1
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# seleniumbase package
|
||||
__version__ = "4.30.5"
|
||||
__version__ = "4.30.6"
|
||||
|
|
|
@ -75,7 +75,7 @@ WAIT_FOR_RSC_ON_PAGE_LOADS = True
|
|||
# Called after self.click(selector), NOT element.click()
|
||||
WAIT_FOR_RSC_ON_CLICKS = False
|
||||
# Wait for AngularJS calls to complete after various browser actions.
|
||||
WAIT_FOR_ANGULARJS = False
|
||||
WAIT_FOR_ANGULARJS = True
|
||||
# Skip all calls to wait_for_ready_state_complete() and wait_for_angularjs().
|
||||
SKIP_JS_WAITS = False
|
||||
|
||||
|
|
|
@ -989,7 +989,10 @@ def _uc_gui_click_captcha(
|
|||
reconnect_time = 1 # Make it quick (it already failed)
|
||||
driver.reconnect(reconnect_time)
|
||||
caught = False
|
||||
if driver.is_element_present(".footer .clearfix .ray-id"):
|
||||
if (
|
||||
driver.is_element_present(".footer .clearfix .ray-id")
|
||||
and not driver.is_element_present("#challenge-success-text")
|
||||
):
|
||||
blind = True
|
||||
caught = True
|
||||
if blind:
|
||||
|
@ -1209,7 +1212,10 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
|
|||
|
||||
def _uc_gui_handle_captcha(driver, frame="iframe", ctype=None):
|
||||
_uc_gui_handle_captcha_(driver, frame=frame, ctype=ctype)
|
||||
if driver.is_element_present(".footer .clearfix .ray-id"):
|
||||
if (
|
||||
driver.is_element_present(".footer .clearfix .ray-id")
|
||||
and not driver.is_element_present("#challenge-success-text")
|
||||
):
|
||||
driver.uc_open_with_reconnect(driver.current_url, 3.8)
|
||||
_uc_gui_handle_captcha_(driver, frame=frame, ctype=ctype)
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ def wait_for_ready_state_complete(driver, timeout=settings.LARGE_TIMEOUT):
|
|||
time.sleep(0.03)
|
||||
return True
|
||||
if ready_state == "complete":
|
||||
time.sleep(0.01) # Better be sure everything is done loading
|
||||
time.sleep(0.002)
|
||||
return True
|
||||
else:
|
||||
now_ms = time.time() * 1000.0
|
||||
|
@ -61,15 +61,14 @@ def wait_for_angularjs(driver, timeout=settings.LARGE_TIMEOUT, **kwargs):
|
|||
driver.execute_script("")
|
||||
except Exception:
|
||||
pass
|
||||
if hasattr(driver, "_is_using_uc") and driver._is_using_uc:
|
||||
# Calling AngularJS waits may make UC Mode detectable.
|
||||
# Instead, pause for a brief moment, and then return.
|
||||
time.sleep(0.007)
|
||||
return
|
||||
if not settings.WAIT_FOR_ANGULARJS:
|
||||
if (
|
||||
(hasattr(driver, "_is_using_uc") and driver._is_using_uc)
|
||||
or not settings.WAIT_FOR_ANGULARJS
|
||||
):
|
||||
wait_for_ready_state_complete(driver)
|
||||
return
|
||||
if timeout == settings.MINI_TIMEOUT:
|
||||
timeout = settings.MINI_TIMEOUT / 4.0
|
||||
timeout = settings.MINI_TIMEOUT / 6.0
|
||||
NG_WRAPPER = (
|
||||
"%(prefix)s"
|
||||
"var $elm=document.querySelector("
|
||||
|
@ -96,7 +95,7 @@ def wait_for_angularjs(driver, timeout=settings.LARGE_TIMEOUT, **kwargs):
|
|||
try:
|
||||
execute_async_script(driver, script, timeout=timeout)
|
||||
except Exception:
|
||||
time.sleep(0.0456)
|
||||
pass
|
||||
|
||||
|
||||
def convert_to_css_selector(selector, by=By.CSS_SELECTOR):
|
||||
|
|
4
setup.py
4
setup.py
|
@ -171,8 +171,8 @@ setup(
|
|||
"idna==3.8",
|
||||
'chardet==5.2.0',
|
||||
'charset-normalizer==3.3.2',
|
||||
'urllib3>=1.26.19,<2;python_version<"3.10"',
|
||||
'urllib3>=1.26.19,<2.3.0;python_version>="3.10"',
|
||||
'urllib3>=1.26.20,<2;python_version<"3.10"',
|
||||
'urllib3>=1.26.20,<2.3.0;python_version>="3.10"',
|
||||
'requests==2.31.0',
|
||||
"pynose==1.5.2",
|
||||
'sniffio==1.3.1',
|
||||
|
|
Loading…
Reference in New Issue