seleniumbase 4.30.1__py3-none-any.whl → 4.30.3__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 +50 -42
- {seleniumbase-4.30.1.dist-info → seleniumbase-4.30.3.dist-info}/METADATA +6 -4
- {seleniumbase-4.30.1.dist-info → seleniumbase-4.30.3.dist-info}/RECORD +8 -8
- {seleniumbase-4.30.1.dist-info → seleniumbase-4.30.3.dist-info}/WHEEL +1 -1
- {seleniumbase-4.30.1.dist-info → seleniumbase-4.30.3.dist-info}/LICENSE +0 -0
- {seleniumbase-4.30.1.dist-info → seleniumbase-4.30.3.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.30.1.dist-info → seleniumbase-4.30.3.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.30.
|
2
|
+
__version__ = "4.30.3"
|
@@ -340,17 +340,19 @@ def find_edgedriver_version_to_use(use_version, driver_version):
|
|
340
340
|
return use_version
|
341
341
|
|
342
342
|
|
343
|
-
def
|
343
|
+
def has_captcha(text):
|
344
344
|
if (
|
345
345
|
"<title>403 Forbidden</title>" in text
|
346
346
|
or "Permission Denied</title>" in text
|
347
347
|
or 'id="challenge-error-text"' in text
|
348
348
|
or "<title>Just a moment..." in text
|
349
349
|
or 'action="/?__cf_chl_f_tk' in text
|
350
|
+
or 'id="challenge-widget-' in text
|
350
351
|
or 'src="chromedriver.js"' in text
|
351
352
|
or 'class="g-recaptcha"' in text
|
352
353
|
or 'content="Pixelscan"' in text
|
353
354
|
or 'id="challenge-form"' in text
|
355
|
+
or "/challenge-platform" in text
|
354
356
|
or "window._cf_chl_opt" in text
|
355
357
|
or "/recaptcha/api.js" in text
|
356
358
|
or "/turnstile/" in text
|
@@ -377,7 +379,7 @@ def uc_special_open_if_cf(
|
|
377
379
|
status_str.startswith("3")
|
378
380
|
or status_str.startswith("4")
|
379
381
|
or status_str.startswith("5")
|
380
|
-
or
|
382
|
+
or has_captcha(req_get.text)
|
381
383
|
):
|
382
384
|
special = True
|
383
385
|
if status_str == "403" or status_str == "429":
|
@@ -763,6 +765,8 @@ def _on_a_cf_turnstile_page(driver):
|
|
763
765
|
source = driver.get_page_source()
|
764
766
|
if (
|
765
767
|
'data-callback="onCaptchaSuccess"' in source
|
768
|
+
or "/challenge-platform/scripts/" in source
|
769
|
+
or 'id="challenge-widget-' in source
|
766
770
|
or "cf-turnstile-" in source
|
767
771
|
):
|
768
772
|
return True
|
@@ -857,48 +861,46 @@ def _uc_gui_click_captcha(
|
|
857
861
|
visible_iframe = False
|
858
862
|
if (
|
859
863
|
frame != "iframe"
|
860
|
-
and driver.is_element_present(
|
861
|
-
|
864
|
+
and driver.is_element_present(
|
865
|
+
"%s .cf-turnstile-wrapper" % frame
|
866
|
+
)
|
867
|
+
):
|
868
|
+
frame = "%s .cf-turnstile-wrapper" % frame
|
869
|
+
elif (
|
870
|
+
frame != "iframe"
|
871
|
+
and driver.is_element_present(
|
872
|
+
'%s [name*="cf-turnstile"]' % frame
|
873
|
+
)
|
874
|
+
and driver.is_element_present("%s div" % frame)
|
862
875
|
):
|
863
|
-
frame = "%s div
|
876
|
+
frame = "%s div" % frame
|
864
877
|
elif (
|
865
878
|
driver.is_element_present('[name*="cf-turnstile-"]')
|
866
879
|
and driver.is_element_present("div.spacer div")
|
867
880
|
):
|
868
881
|
frame = "div.spacer div"
|
869
882
|
elif (
|
870
|
-
(
|
871
|
-
driver.is_element_present('[name*="cf-turnstile-"]')
|
872
|
-
or driver.is_element_present('[id*="cf-turnstile-"]')
|
873
|
-
)
|
883
|
+
driver.is_element_present('script[src*="challenges.c"]')
|
874
884
|
and driver.is_element_present(
|
875
|
-
'
|
885
|
+
'[data-testid*="challenge-"] div'
|
876
886
|
)
|
877
887
|
):
|
878
|
-
frame = '
|
888
|
+
frame = '[data-testid*="challenge-"] div'
|
889
|
+
elif driver.is_element_present(
|
890
|
+
'form div:not([class]):has(input[name*="cf-turn"])'
|
891
|
+
):
|
892
|
+
frame = 'form div:not([class]):has(input[name*="cf-turn"])'
|
879
893
|
elif (
|
880
|
-
|
881
|
-
and driver.is_element_present(
|
882
|
-
"%s .cf-turnstile-wrapper" % frame
|
883
|
-
)
|
894
|
+
driver.is_element_present('[src*="/turnstile/"]')
|
895
|
+
and driver.is_element_present("form div:not(:has(*))")
|
884
896
|
):
|
885
|
-
frame = "
|
897
|
+
frame = "form div:not(:has(*))"
|
886
898
|
elif driver.is_element_present(".cf-turnstile-wrapper"):
|
887
899
|
frame = ".cf-turnstile-wrapper"
|
888
900
|
elif driver.is_element_present(
|
889
901
|
'[data-callback="onCaptchaSuccess"]'
|
890
902
|
):
|
891
903
|
frame = '[data-callback="onCaptchaSuccess"]'
|
892
|
-
elif (
|
893
|
-
(
|
894
|
-
driver.is_element_present('[name*="cf-turnstile-"]')
|
895
|
-
or driver.is_element_present('[id*="cf-turnstile-"]')
|
896
|
-
)
|
897
|
-
and driver.is_element_present(
|
898
|
-
'div > div > [style*="margin"][style*="padding"]'
|
899
|
-
)
|
900
|
-
):
|
901
|
-
frame = 'div > div > [style*="margin"][style*="padding"]'
|
902
904
|
else:
|
903
905
|
return
|
904
906
|
if driver.is_element_present('form[class*=center]'):
|
@@ -1081,6 +1083,8 @@ def _uc_gui_handle_captcha(
|
|
1081
1083
|
driver.minimize_window()
|
1082
1084
|
driver.set_window_rect(win_x, win_y, width, height)
|
1083
1085
|
time.sleep(0.33)
|
1086
|
+
tab_up_first = False
|
1087
|
+
special_form = False
|
1084
1088
|
if ctype == "cf_t":
|
1085
1089
|
if (
|
1086
1090
|
driver.is_element_present(".cf-turnstile-wrapper iframe")
|
@@ -1103,25 +1107,24 @@ def _uc_gui_handle_captcha(
|
|
1103
1107
|
):
|
1104
1108
|
frame = "div.spacer div"
|
1105
1109
|
elif (
|
1106
|
-
(
|
1107
|
-
driver.is_element_present('[name*="cf-turnstile-"]')
|
1108
|
-
or driver.is_element_present('[id*="cf-turnstile-"]')
|
1109
|
-
)
|
1110
|
+
driver.is_element_present('script[src*="challenges.c"]')
|
1110
1111
|
and driver.is_element_present(
|
1111
|
-
'
|
1112
|
+
'[data-testid*="challenge-"] div'
|
1112
1113
|
)
|
1113
1114
|
):
|
1114
|
-
frame = '
|
1115
|
+
frame = '[data-testid*="challenge-"] div'
|
1116
|
+
elif driver.is_element_present(
|
1117
|
+
'form div:not([class]):has(input[name*="cf-turn"])'
|
1118
|
+
):
|
1119
|
+
frame = 'form div:not([class]):has(input[name*="cf-turn"])'
|
1120
|
+
tab_up_first = True
|
1121
|
+
special_form = True
|
1115
1122
|
elif (
|
1116
|
-
(
|
1117
|
-
|
1118
|
-
or driver.is_element_present('[id*="cf-turnstile-"]')
|
1119
|
-
)
|
1120
|
-
and driver.is_element_present(
|
1121
|
-
'div > div > [style*="margin"][style*="padding"]'
|
1122
|
-
)
|
1123
|
+
driver.is_element_present('[src*="/turnstile/"]')
|
1124
|
+
and driver.is_element_present("form div:not(:has(*))")
|
1123
1125
|
):
|
1124
|
-
frame =
|
1126
|
+
frame = "form div:not(:has(*))"
|
1127
|
+
tab_up_first = True
|
1125
1128
|
else:
|
1126
1129
|
return
|
1127
1130
|
else:
|
@@ -1146,13 +1149,18 @@ def _uc_gui_handle_captcha(
|
|
1146
1149
|
if ctype == "g_rc":
|
1147
1150
|
selector = "span#recaptcha-anchor"
|
1148
1151
|
found_checkbox = False
|
1149
|
-
|
1152
|
+
if tab_up_first:
|
1153
|
+
for i in range(10):
|
1154
|
+
pyautogui.hotkey("shift", "tab")
|
1155
|
+
time.sleep(0.027)
|
1156
|
+
for i in range(34):
|
1150
1157
|
pyautogui.press("\t")
|
1151
|
-
time.sleep(0.
|
1158
|
+
time.sleep(0.027)
|
1152
1159
|
active_element_css = js_utils.get_active_element_css(driver)
|
1153
1160
|
if (
|
1154
1161
|
active_element_css.startswith(selector)
|
1155
1162
|
or active_element_css.endswith(" > div" * 2)
|
1163
|
+
or (special_form and active_element_css.endswith(" div"))
|
1156
1164
|
):
|
1157
1165
|
found_checkbox = True
|
1158
1166
|
break
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.30.
|
3
|
+
Version: 4.30.3
|
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
|
@@ -160,8 +160,8 @@ Requires-Dist: pdfminer.six ==20221105 ; (python_version < "3.8") and extra == '
|
|
160
160
|
Requires-Dist: cffi ==1.15.1 ; (python_version < "3.8") and extra == 'pdfminer'
|
161
161
|
Requires-Dist: cryptography ==39.0.2 ; (python_version < "3.9") and extra == 'pdfminer'
|
162
162
|
Requires-Dist: pdfminer.six ==20240706 ; (python_version >= "3.8") and extra == 'pdfminer'
|
163
|
-
Requires-Dist: cffi ==1.17.
|
164
|
-
Requires-Dist: cryptography ==43.0.
|
163
|
+
Requires-Dist: cffi ==1.17.1 ; (python_version >= "3.8") and extra == 'pdfminer'
|
164
|
+
Requires-Dist: cryptography ==43.0.1 ; (python_version >= "3.9") and extra == 'pdfminer'
|
165
165
|
Provides-Extra: pillow
|
166
166
|
Requires-Dist: Pillow ==9.5.0 ; (python_version < "3.8") and extra == 'pillow'
|
167
167
|
Requires-Dist: Pillow >=10.4.0 ; (python_version >= "3.8") and extra == 'pillow'
|
@@ -239,13 +239,15 @@ Requires-Dist: pyasn1 ==0.6.0 ; (python_version >= "3.8") and extra == 'selenium
|
|
239
239
|
<br />
|
240
240
|
</p>
|
241
241
|
|
242
|
+
<p>SeleniumBase is the professional toolkit for web automation activities. Built for testing websites, bypassing CAPTCHAs, enhancing productivity, completing tasks, and scaling your business.</p>
|
243
|
+
|
242
244
|
--------
|
243
245
|
|
244
246
|
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
|
245
247
|
|
246
248
|
👤 Note that <span translate="no">SeleniumBase</span> <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b> (Stealth Mode) has its own ReadMe</a>.
|
247
249
|
|
248
|
-
ℹ️ Scripts can be called via <code translate="no"><b>python</b></code>, although some <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover
|
250
|
+
ℹ️ Scripts can be called via <code translate="no"><b>python</b></code>, although some <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
|
249
251
|
|
250
252
|
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>, which tests login, shopping, and checkout:</p>
|
251
253
|
|
@@ -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=Oloi19JNV2Kk1XvsGrHH-4lT87W5MMes86obgvYyGDM,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=ZW2-FmdYcAhl6xFTrPtIOniGz_CtJpbEg0EjGSZALQ4,198233
|
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
|
@@ -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.30.
|
141
|
-
seleniumbase-4.30.
|
142
|
-
seleniumbase-4.30.
|
143
|
-
seleniumbase-4.30.
|
144
|
-
seleniumbase-4.30.
|
145
|
-
seleniumbase-4.30.
|
140
|
+
seleniumbase-4.30.3.dist-info/LICENSE,sha256=odSYtWibXBnQ1gBg6CnDZ82n8kLF_if5-2nbqnEyD8k,1085
|
141
|
+
seleniumbase-4.30.3.dist-info/METADATA,sha256=KbCnEa6cmntlRRwsX1h9YN6Gi_dQUyo0ytStEB7fprQ,86380
|
142
|
+
seleniumbase-4.30.3.dist-info/WHEEL,sha256=uCRv0ZEik_232NlR4YDw4Pv3Ajt5bKvMH13NUU7hFuI,91
|
143
|
+
seleniumbase-4.30.3.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
144
|
+
seleniumbase-4.30.3.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
145
|
+
seleniumbase-4.30.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|