seleniumbase 4.28.6__py3-none-any.whl → 4.29.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- seleniumbase/__version__.py +1 -1
- seleniumbase/core/browser_launcher.py +22 -4
- seleniumbase/fixtures/base_case.py +2 -0
- {seleniumbase-4.28.6.dist-info → seleniumbase-4.29.0.dist-info}/METADATA +5 -4
- {seleniumbase-4.28.6.dist-info → seleniumbase-4.29.0.dist-info}/RECORD +9 -9
- {seleniumbase-4.28.6.dist-info → seleniumbase-4.29.0.dist-info}/WHEEL +1 -1
- {seleniumbase-4.28.6.dist-info → seleniumbase-4.29.0.dist-info}/LICENSE +0 -0
- {seleniumbase-4.28.6.dist-info → seleniumbase-4.29.0.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.28.6.dist-info → seleniumbase-4.29.0.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.
|
2
|
+
__version__ = "4.29.0"
|
@@ -680,6 +680,8 @@ def get_gui_element_position(driver, selector):
|
|
680
680
|
viewport_height = driver.execute_script("return window.innerHeight;")
|
681
681
|
viewport_x = window_rect["x"] + element_rect["x"]
|
682
682
|
viewport_y = window_bottom_y - viewport_height + element_rect["y"]
|
683
|
+
y_scroll_offset = driver.execute_script("return window.pageYOffset;")
|
684
|
+
viewport_y = viewport_y - y_scroll_offset
|
683
685
|
return (viewport_x, viewport_y)
|
684
686
|
|
685
687
|
|
@@ -688,7 +690,7 @@ def _uc_gui_click_x_y(driver, x, y, timeframe=0.25, uc_lock=False):
|
|
688
690
|
import pyautogui
|
689
691
|
pyautogui = get_configured_pyautogui(pyautogui)
|
690
692
|
screen_width, screen_height = pyautogui.size()
|
691
|
-
if x > screen_width or y > screen_height:
|
693
|
+
if x < 0 or y < 0 or x > screen_width or y > screen_height:
|
692
694
|
raise Exception(
|
693
695
|
"PyAutoGUI cannot click on point (%s, %s)"
|
694
696
|
" outside screen. (Width: %s, Height: %s)"
|
@@ -799,7 +801,14 @@ def _uc_gui_click_captcha(
|
|
799
801
|
pass
|
800
802
|
else:
|
801
803
|
visible_iframe = False
|
802
|
-
if
|
804
|
+
if (
|
805
|
+
frame != "iframe"
|
806
|
+
and driver.is_element_present(
|
807
|
+
"%s .cf-turnstile-wrapper" % frame
|
808
|
+
)
|
809
|
+
):
|
810
|
+
frame = "%s .cf-turnstile-wrapper" % frame
|
811
|
+
elif driver.is_element_present(".cf-turnstile-wrapper"):
|
803
812
|
frame = ".cf-turnstile-wrapper"
|
804
813
|
elif driver.is_element_present(
|
805
814
|
'[data-callback="onCaptchaSuccess"]'
|
@@ -807,6 +816,16 @@ def _uc_gui_click_captcha(
|
|
807
816
|
frame = '[data-callback="onCaptchaSuccess"]'
|
808
817
|
else:
|
809
818
|
return
|
819
|
+
if driver.is_element_present('form[class*=center]'):
|
820
|
+
script = (
|
821
|
+
"""var $elements = document.querySelectorAll('form');
|
822
|
+
var index = 0, length = $elements.length;
|
823
|
+
for(; index < length; index++){
|
824
|
+
the_class = $elements[index].getAttribute('class');
|
825
|
+
new_class = the_class.replaceAll('center', 'left');
|
826
|
+
$elements[index].setAttribute('class', new_class);}"""
|
827
|
+
)
|
828
|
+
driver.execute_script(script)
|
810
829
|
if not is_in_frame or needs_switch:
|
811
830
|
# Currently not in frame (or nested frame outside CF one)
|
812
831
|
try:
|
@@ -977,7 +996,7 @@ def uc_gui_handle_cf(driver, frame="iframe"):
|
|
977
996
|
return
|
978
997
|
try:
|
979
998
|
found_checkbox = False
|
980
|
-
for i in range(
|
999
|
+
for i in range(24):
|
981
1000
|
pyautogui.press("\t")
|
982
1001
|
time.sleep(0.02)
|
983
1002
|
active_element_css = js_utils.get_active_element_css(driver)
|
@@ -987,7 +1006,6 @@ def uc_gui_handle_cf(driver, frame="iframe"):
|
|
987
1006
|
time.sleep(0.02)
|
988
1007
|
if not found_checkbox:
|
989
1008
|
return
|
990
|
-
driver.execute_script('document.querySelector("input").focus()')
|
991
1009
|
except Exception:
|
992
1010
|
try:
|
993
1011
|
driver.switch_to.default_content()
|
@@ -3418,6 +3418,8 @@ class BaseCase(unittest.TestCase):
|
|
3418
3418
|
viewport_height = self.execute_script("return window.innerHeight;")
|
3419
3419
|
x = math.ceil(window_rect["x"] + i_x + element_rect["x"])
|
3420
3420
|
y = math.ceil(w_bottom_y - viewport_height + i_y + element_rect["y"])
|
3421
|
+
y_scroll_offset = self.execute_script("return window.pageYOffset;")
|
3422
|
+
y = int(y - y_scroll_offset)
|
3421
3423
|
if iframe_switch:
|
3422
3424
|
self.switch_to_frame()
|
3423
3425
|
if not self.is_element_present(selector, by=by):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.29.0
|
4
4
|
Summary: A complete web automation framework for end-to-end testing.
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
6
6
|
Author: Michael Mintz
|
@@ -122,10 +122,10 @@ Requires-Dist: platformdirs >=4.2.2 ; python_version >= "3.8"
|
|
122
122
|
Requires-Dist: typing-extensions >=4.12.2 ; python_version >= "3.8"
|
123
123
|
Requires-Dist: trio ==0.26.0 ; python_version >= "3.8"
|
124
124
|
Requires-Dist: websocket-client ==1.8.0 ; python_version >= "3.8"
|
125
|
-
Requires-Dist: selenium ==4.
|
125
|
+
Requires-Dist: selenium ==4.23.1 ; python_version >= "3.8"
|
126
126
|
Requires-Dist: execnet ==2.1.1 ; python_version >= "3.8"
|
127
127
|
Requires-Dist: pluggy ==1.5.0 ; python_version >= "3.8"
|
128
|
-
Requires-Dist: pytest ==8.
|
128
|
+
Requires-Dist: pytest ==8.3.1 ; python_version >= "3.8"
|
129
129
|
Requires-Dist: pytest-metadata ==3.1.1 ; python_version >= "3.8"
|
130
130
|
Requires-Dist: pytest-rerunfailures ==14.0 ; python_version >= "3.8"
|
131
131
|
Requires-Dist: pytest-xdist ==3.6.1 ; python_version >= "3.8"
|
@@ -160,7 +160,7 @@ Requires-Dist: cffi ==1.15.1 ; (python_version < "3.8") and extra == 'pdfminer'
|
|
160
160
|
Requires-Dist: cryptography ==39.0.2 ; (python_version < "3.9") and extra == 'pdfminer'
|
161
161
|
Requires-Dist: pdfminer.six ==20240706 ; (python_version >= "3.8") and extra == 'pdfminer'
|
162
162
|
Requires-Dist: cffi ==1.16.0 ; (python_version >= "3.8") and extra == 'pdfminer'
|
163
|
-
Requires-Dist: cryptography ==
|
163
|
+
Requires-Dist: cryptography ==43.0.0 ; (python_version >= "3.9") and extra == 'pdfminer'
|
164
164
|
Provides-Extra: pillow
|
165
165
|
Requires-Dist: Pillow ==9.5.0 ; (python_version < "3.8") and extra == 'pillow'
|
166
166
|
Requires-Dist: Pillow >=10.4.0 ; (python_version >= "3.8") and extra == 'pillow'
|
@@ -176,6 +176,7 @@ Provides-Extra: selenium-stealth
|
|
176
176
|
Requires-Dist: selenium-stealth ==1.0.6 ; extra == 'selenium-stealth'
|
177
177
|
Provides-Extra: selenium-wire
|
178
178
|
Requires-Dist: selenium-wire ==5.1.0 ; extra == 'selenium-wire'
|
179
|
+
Requires-Dist: pyOpenSSL ==24.2.1 ; extra == 'selenium-wire'
|
179
180
|
Requires-Dist: Brotli ==1.1.0 ; extra == 'selenium-wire'
|
180
181
|
Requires-Dist: blinker ==1.7.0 ; extra == 'selenium-wire'
|
181
182
|
Requires-Dist: h2 ==4.1.0 ; extra == 'selenium-wire'
|
@@ -5,7 +5,7 @@ sbase/steps.py,sha256=bKT_u5bJkKzYWEuAXi9NVVRYYxQRCM1_YJUrNFFRVPY,42865
|
|
5
5
|
seleniumbase/ReadMe.md,sha256=4nEdto4d0Ch0Zneg0yAC-RBBdqRqPUP0SCo-ze_XDPM,3612
|
6
6
|
seleniumbase/__init__.py,sha256=dgq30q6wGO2fJOVYemxC5hLxzv-of-MRn5P1YarBq5k,2263
|
7
7
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
8
|
-
seleniumbase/__version__.py,sha256=
|
8
|
+
seleniumbase/__version__.py,sha256=E_yOGLluQHTOwPLRiP3vQWKLCMK7WtvuhuOL72u1GX4,46
|
9
9
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
seleniumbase/behave/behave_helper.py,sha256=elkl8P9eLulRAioLstE9baYNM9N_PHBmAOcajX-pH_Y,24198
|
11
11
|
seleniumbase/behave/behave_sb.py,sha256=q4uYZixZBf7VYWnQnEk2weTcyMy1X1faR3vyYvUzDiA,56406
|
@@ -40,7 +40,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=yo641b_OdSE0GUauOyxk-QrNeIjYzbRY
|
|
40
40
|
seleniumbase/console_scripts/sb_recorder.py,sha256=UQQhnAR18dbcC7ToDvj6TM2PIG5qBrNaekaM6kSK_E8,10970
|
41
41
|
seleniumbase/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
42
|
seleniumbase/core/application_manager.py,sha256=e_0sjtI8cjY5BNyZj1QBR0j6_oCScxGmSXYEpcYwuZE,576
|
43
|
-
seleniumbase/core/browser_launcher.py,sha256=
|
43
|
+
seleniumbase/core/browser_launcher.py,sha256=J_OUeFrPBo8OCpyCtGd9y276rEkJItisoOq_HEdpv2Y,189506
|
44
44
|
seleniumbase/core/capabilities_parser.py,sha256=meIS2uHapTCq2ldfNAToC7r0cKmZDRXuYNKExM1GHDY,6038
|
45
45
|
seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
|
46
46
|
seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
|
@@ -70,7 +70,7 @@ seleniumbase/extensions/disable_csp.zip,sha256=YMifIIgEBiLrEFrS1sfW4Exh4br1V4oK1
|
|
70
70
|
seleniumbase/extensions/recorder.zip,sha256=OOyzF-Ize2cSRu1CqhzSAq5vusI9hqLLd2OIApUHesI,11918
|
71
71
|
seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
|
72
72
|
seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
73
|
-
seleniumbase/fixtures/base_case.py,sha256=
|
73
|
+
seleniumbase/fixtures/base_case.py,sha256=pWWWCBg_L1d0nfuK6g0rtlf232CvolEdUomxhmylG6A,701612
|
74
74
|
seleniumbase/fixtures/constants.py,sha256=TapuGLdERtvZPGMblVXkNGybr8tj8FMtN3sbJ3ygyoc,13569
|
75
75
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
76
76
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
@@ -137,9 +137,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443
|
|
137
137
|
seleniumbase/utilities/selenium_ide/ReadMe.md,sha256=hznGeuMpkIimqMiZBW-4goIy2ltW4l8X9kb0YSPUQfE,4483
|
138
138
|
seleniumbase/utilities/selenium_ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
139
139
|
seleniumbase/utilities/selenium_ide/convert_ide.py,sha256=pZFnqEJQEKZPyNFjkLD29s2HPQgCrWW9XJWpCPhWOoM,31691
|
140
|
-
seleniumbase-4.
|
141
|
-
seleniumbase-4.
|
142
|
-
seleniumbase-4.
|
143
|
-
seleniumbase-4.
|
144
|
-
seleniumbase-4.
|
145
|
-
seleniumbase-4.
|
140
|
+
seleniumbase-4.29.0.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
141
|
+
seleniumbase-4.29.0.dist-info/METADATA,sha256=-596hLy-dePdBhXmCw3JmKM4HyOwCH5hwmgzwl8WBr8,85695
|
142
|
+
seleniumbase-4.29.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
143
|
+
seleniumbase-4.29.0.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
144
|
+
seleniumbase-4.29.0.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
145
|
+
seleniumbase-4.29.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|