seleniumbase 4.41.11__py3-none-any.whl → 4.42.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 +2 -0
- seleniumbase/core/sb_driver.py +10 -0
- seleniumbase/fixtures/base_case.py +14 -0
- seleniumbase/fixtures/page_actions.py +16 -0
- seleniumbase/fixtures/shared_utils.py +13 -1
- {seleniumbase-4.41.11.dist-info → seleniumbase-4.42.0.dist-info}/METADATA +9 -8
- {seleniumbase-4.41.11.dist-info → seleniumbase-4.42.0.dist-info}/RECORD +12 -12
- {seleniumbase-4.41.11.dist-info → seleniumbase-4.42.0.dist-info}/WHEEL +0 -0
- {seleniumbase-4.41.11.dist-info → seleniumbase-4.42.0.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.41.11.dist-info → seleniumbase-4.42.0.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.41.11.dist-info → seleniumbase-4.42.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.42.0"
|
@@ -228,6 +228,8 @@ def extend_driver(
|
|
228
228
|
driver.wait_for_element = DM.wait_for_element
|
229
229
|
driver.wait_for_element_visible = DM.wait_for_element_visible
|
230
230
|
driver.wait_for_element_present = DM.wait_for_element_present
|
231
|
+
driver.wait_for_element_absent = DM.wait_for_element_absent
|
232
|
+
driver.wait_for_element_not_visible = DM.wait_for_element_not_visible
|
231
233
|
driver.wait_for_selector = DM.wait_for_selector
|
232
234
|
driver.wait_for_text = DM.wait_for_text
|
233
235
|
driver.wait_for_exact_text = DM.wait_for_exact_text
|
seleniumbase/core/sb_driver.py
CHANGED
@@ -137,6 +137,16 @@ class DriverMethods(WebDriver):
|
|
137
137
|
def wait_for_element_present(self, *args, **kwargs):
|
138
138
|
return page_actions.wait_for_selector(self.driver, *args, **kwargs)
|
139
139
|
|
140
|
+
def wait_for_element_absent(self, *args, **kwargs):
|
141
|
+
return page_actions.wait_for_element_absent(
|
142
|
+
self.driver, *args, **kwargs
|
143
|
+
)
|
144
|
+
|
145
|
+
def wait_for_element_not_visible(self, *args, **kwargs):
|
146
|
+
return page_actions.wait_for_element_not_visible(
|
147
|
+
self.driver, *args, **kwargs
|
148
|
+
)
|
149
|
+
|
140
150
|
def wait_for_selector(self, *args, **kwargs):
|
141
151
|
return page_actions.wait_for_selector(self.driver, *args, **kwargs)
|
142
152
|
|
@@ -5419,6 +5419,20 @@ class BaseCase(unittest.TestCase):
|
|
5419
5419
|
)
|
5420
5420
|
):
|
5421
5421
|
srt_actions[n][0] = "_skip"
|
5422
|
+
for n in range(len(srt_actions)):
|
5423
|
+
if (
|
5424
|
+
(srt_actions[n][0] == "begin" or srt_actions[n][0] == "_url_")
|
5425
|
+
and n > 1
|
5426
|
+
and (
|
5427
|
+
srt_actions[n - 1][0] == "f_url"
|
5428
|
+
or srt_actions[n - 1][0] == "_url_"
|
5429
|
+
)
|
5430
|
+
and srt_actions[n][2] == srt_actions[n - 1][2]
|
5431
|
+
and (
|
5432
|
+
int(srt_actions[n][3]) - int(srt_actions[n - 1][3]) < 4800
|
5433
|
+
)
|
5434
|
+
):
|
5435
|
+
srt_actions[n][0] = "_skip"
|
5422
5436
|
for n in range(len(srt_actions)):
|
5423
5437
|
if (
|
5424
5438
|
srt_actions[n][0] == "input"
|
@@ -1108,6 +1108,14 @@ def wait_for_element_absent(
|
|
1108
1108
|
timeout - the time to wait for elements in seconds
|
1109
1109
|
original_selector - handle pre-converted ":contains(TEXT)" selector
|
1110
1110
|
"""
|
1111
|
+
if __is_cdp_swap_needed(driver):
|
1112
|
+
if page_utils.is_valid_by(by):
|
1113
|
+
original_selector = selector
|
1114
|
+
elif page_utils.is_valid_by(selector):
|
1115
|
+
original_selector = by
|
1116
|
+
selector, by = page_utils.recalculate_selector(original_selector, by)
|
1117
|
+
driver.cdp.wait_for_element_absent(selector)
|
1118
|
+
return True
|
1111
1119
|
_reconnect_if_disconnected(driver)
|
1112
1120
|
start_ms = time.time() * 1000.0
|
1113
1121
|
stop_ms = start_ms + (timeout * 1000.0)
|
@@ -1156,6 +1164,14 @@ def wait_for_element_not_visible(
|
|
1156
1164
|
timeout - the time to wait for the element in seconds
|
1157
1165
|
original_selector - handle pre-converted ":contains(TEXT)" selector
|
1158
1166
|
"""
|
1167
|
+
if __is_cdp_swap_needed(driver):
|
1168
|
+
if page_utils.is_valid_by(by):
|
1169
|
+
original_selector = selector
|
1170
|
+
elif page_utils.is_valid_by(selector):
|
1171
|
+
original_selector = by
|
1172
|
+
selector, by = page_utils.recalculate_selector(original_selector, by)
|
1173
|
+
driver.cdp.wait_for_element_not_visible(selector)
|
1174
|
+
return True
|
1159
1175
|
_reconnect_if_disconnected(driver)
|
1160
1176
|
start_ms = time.time() * 1000.0
|
1161
1177
|
stop_ms = start_ms + (timeout * 1000.0)
|
@@ -29,8 +29,20 @@ def pip_install(package, version=None):
|
|
29
29
|
)
|
30
30
|
|
31
31
|
|
32
|
+
def is_arm_linux():
|
33
|
+
"""Returns True if machine is ARM Linux.
|
34
|
+
This will be useful once Google adds
|
35
|
+
support for ARM Linux ChromeDriver.
|
36
|
+
(Raspberry Pi uses ARM architecture.)"""
|
37
|
+
return (
|
38
|
+
platform.system() == "Linux"
|
39
|
+
and platform.machine() == "aarch64"
|
40
|
+
)
|
41
|
+
|
42
|
+
|
32
43
|
def is_arm_mac():
|
33
|
-
"""
|
44
|
+
"""Returns True if machine is ARM Mac.
|
45
|
+
(Eg. M1 / M2 Macs use ARM processors)"""
|
34
46
|
return (
|
35
47
|
"darwin" in sys.platform
|
36
48
|
and (
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.42.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
|
@@ -78,7 +78,8 @@ Requires-Dist: mycdp>=1.2.0
|
|
78
78
|
Requires-Dist: pynose>=1.5.5
|
79
79
|
Requires-Dist: platformdirs>=4.3.6; python_version < "3.9"
|
80
80
|
Requires-Dist: platformdirs>=4.4.0; python_version >= "3.9"
|
81
|
-
Requires-Dist: typing-extensions
|
81
|
+
Requires-Dist: typing-extensions~=4.13.2; python_version < "3.9"
|
82
|
+
Requires-Dist: typing-extensions>=4.15.0; python_version >= "3.9"
|
82
83
|
Requires-Dist: sbvirtualdisplay>=1.4.0
|
83
84
|
Requires-Dist: MarkupSafe==2.1.5; python_version < "3.9"
|
84
85
|
Requires-Dist: MarkupSafe>=3.0.3; python_version >= "3.9"
|
@@ -103,13 +104,13 @@ Requires-Dist: sniffio==1.3.1
|
|
103
104
|
Requires-Dist: h11==0.16.0
|
104
105
|
Requires-Dist: outcome==1.3.0.post0
|
105
106
|
Requires-Dist: trio==0.27.0; python_version < "3.9"
|
106
|
-
Requires-Dist: trio
|
107
|
+
Requires-Dist: trio<1,>=0.31.0; python_version >= "3.9"
|
107
108
|
Requires-Dist: trio-websocket~=0.12.2
|
108
109
|
Requires-Dist: wsproto==1.2.0
|
109
110
|
Requires-Dist: websocket-client~=1.8.0
|
110
111
|
Requires-Dist: selenium==4.27.1; python_version < "3.9"
|
111
112
|
Requires-Dist: selenium==4.32.0; python_version >= "3.9" and python_version < "3.10"
|
112
|
-
Requires-Dist: selenium==4.
|
113
|
+
Requires-Dist: selenium==4.36.0; python_version >= "3.10"
|
113
114
|
Requires-Dist: cssselect==1.2.0; python_version < "3.9"
|
114
115
|
Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
|
115
116
|
Requires-Dist: sortedcontainers==2.4.0
|
@@ -275,7 +276,7 @@ Dynamic: summary
|
|
275
276
|
|
276
277
|
--------
|
277
278
|
|
278
|
-
<p align="left">📗
|
279
|
+
<p align="left">📗 Here's a test script that performs a Google Search using SeleniumBase UC Mode:<br /><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">SeleniumBase/examples/raw_google.py</a> (Results are saved as PDF, HTML, and PNG)</p>
|
279
280
|
|
280
281
|
```python
|
281
282
|
from seleniumbase import SB
|
@@ -299,7 +300,7 @@ with SB(test=True, uc=True) as sb:
|
|
299
300
|
|
300
301
|
--------
|
301
302
|
|
302
|
-
<p align="left">📗 Here's
|
303
|
+
<p align="left">📗 Here's a script that bypasses Cloudflare's challenge page with UC Mode + CDP Mode: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py">SeleniumBase/examples/cdp_mode/raw_gitlab.py</a></p>
|
303
304
|
|
304
305
|
```python
|
305
306
|
from seleniumbase import SB
|
@@ -319,7 +320,7 @@ with SB(uc=True, test=True, locale="en") as sb:
|
|
319
320
|
|
320
321
|
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
|
321
322
|
|
322
|
-
<p align="left">📙
|
323
|
+
<p align="left">📙 There's also SeleniumBase's "Pure CDP Mode", which doesn't use WebDriver or Selenium at all: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_gitlab.py">SeleniumBase/examples/cdp_mode/raw_cdp_gitlab.py</a></p>
|
323
324
|
|
324
325
|
```python
|
325
326
|
from seleniumbase import sb_cdp
|
@@ -333,7 +334,7 @@ sb.highlight('button:contains("Sign in")')
|
|
333
334
|
sb.driver.stop()
|
334
335
|
```
|
335
336
|
|
336
|
-
> (Due to
|
337
|
+
> (Due to changes in Chrome 137 where the `--load-extension` switch was removed, you can't load extensions directly from this format.)
|
337
338
|
|
338
339
|
--------
|
339
340
|
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
3
|
sbase/steps.py,sha256=wiPSWZhFpBlWvkqXRJ18btpBu3nQaw9K5AzIJNAX5RM,43521
|
4
4
|
seleniumbase/__init__.py,sha256=JFEY9P5QJqsa1M6ghzLMH2eIPQyh85iglCaQwg8Y8z4,2498
|
5
5
|
seleniumbase/__main__.py,sha256=dn1p6dgCchmcH1zzTzzQvFwwdQQqnTGH6ULV9m4hv24,654
|
6
|
-
seleniumbase/__version__.py,sha256=
|
6
|
+
seleniumbase/__version__.py,sha256=N1arM-skVh6zRajtpFFWMVNWsPy3F3h5dzLOsBEdBJs,46
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
seleniumbase/behave/behave_helper.py,sha256=lJtagtivSbEpbRj0EKV4l4PuPU6NANONJJAnYwgVCe0,24379
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=guLihFsr1uJ4v2AR3r3Vy_BTeHrHwy2JEJxhp-MVnZA,59872
|
@@ -36,7 +36,7 @@ seleniumbase/console_scripts/sb_print.py,sha256=tNy-bMDgwHJO3bZxMpmo9weSE8uhbH0C
|
|
36
36
|
seleniumbase/console_scripts/sb_recorder.py,sha256=DH-n2fN7N9qyHMl7wjtn8MiliBgfw-1kwgmfg1GUuhk,10772
|
37
37
|
seleniumbase/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
seleniumbase/core/application_manager.py,sha256=e_0sjtI8cjY5BNyZj1QBR0j6_oCScxGmSXYEpcYwuZE,576
|
39
|
-
seleniumbase/core/browser_launcher.py,sha256=
|
39
|
+
seleniumbase/core/browser_launcher.py,sha256=cSmw7jWCIcrEiJtxW-HP6F41sHtR4wh-ovl1EwVgu7o,250444
|
40
40
|
seleniumbase/core/capabilities_parser.py,sha256=meIS2uHapTCq2ldfNAToC7r0cKmZDRXuYNKExM1GHDY,6038
|
41
41
|
seleniumbase/core/colored_traceback.py,sha256=DrRWfg7XEnKcgY59Xj7Jdk09H-XqHYBSUpB-DiZt6iY,2020
|
42
42
|
seleniumbase/core/create_db_tables.sql,sha256=VWPtrdiW_HQ6yETHjqTu-VIrTwvd8I8o1NfBeaVSHpU,972
|
@@ -51,7 +51,7 @@ seleniumbase/core/recorder_helper.py,sha256=gDION28OK4NAYsE-7ohKZ9Z3sxQQ0FEjf859
|
|
51
51
|
seleniumbase/core/report_helper.py,sha256=AIl6Qava2yW1uSzbLpJBlPlYDz0KE-rVhogh8hsGWBo,12201
|
52
52
|
seleniumbase/core/s3_manager.py,sha256=z_4qx2jI_gtK5r3niGXgEOBpfMUicUCOciowai50MP4,3529
|
53
53
|
seleniumbase/core/sb_cdp.py,sha256=FpeEZ3-LB-IsIISV4QPzkaN0PcUloiPpBd2AZ78kZIA,103248
|
54
|
-
seleniumbase/core/sb_driver.py,sha256
|
54
|
+
seleniumbase/core/sb_driver.py,sha256=-IQsskc7HpXQbcBL04IPjmGpyYchyo7v9OPF2WcahDw,14159
|
55
55
|
seleniumbase/core/session_helper.py,sha256=s9zD3PVZEWVzG2h81cCUskbNWLfdjC_LwwQjKptHCak,558
|
56
56
|
seleniumbase/core/settings_parser.py,sha256=gqVohHVlE_5L5Cqe2L24uYrRzvoK-saX8E_Df7_-_3I,7609
|
57
57
|
seleniumbase/core/style_sheet.py,sha256=5qYN5GLk4gkwg7nqp3h0XH5YXRijANzKDuEdalzccuw,11714
|
@@ -67,14 +67,14 @@ seleniumbase/extensions/disable_csp.zip,sha256=5RvomXnm2PdivUVcxTV6jfvD8WhTEsQYH
|
|
67
67
|
seleniumbase/extensions/recorder.zip,sha256=JEE_FVEvlS63cFQbVLEroIyPSS91nWCDL0MhjVrmIpk,11813
|
68
68
|
seleniumbase/extensions/sbase_ext.zip,sha256=3s1N8zrVaMz8RQEOIoBzC3KDjtmHwVZRvVsX25Odr_s,8175
|
69
69
|
seleniumbase/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
70
|
-
seleniumbase/fixtures/base_case.py,sha256=
|
70
|
+
seleniumbase/fixtures/base_case.py,sha256=nnPUREzeNfpnOP9q1ZO--guOtHIm3efus4WRsw5E_NQ,742045
|
71
71
|
seleniumbase/fixtures/constants.py,sha256=WMrItuNyKq3XVJ64NluLIRc4gJCxDw8K8qXED0b9S2w,13752
|
72
72
|
seleniumbase/fixtures/css_to_xpath.py,sha256=9ouDB1xl4MJ2os6JOgTIAyHKOQfuxtxvXC3O5hSnEKA,1954
|
73
73
|
seleniumbase/fixtures/errors.py,sha256=KyxuEVx_e3MPhVrJfNIa_3ltMpbCFxfy_jxK8RFNTns,555
|
74
74
|
seleniumbase/fixtures/js_utils.py,sha256=Ykt019DFP8S27o8Kai_ihT01qQWo3RqHUeljqOEUdFU,52247
|
75
|
-
seleniumbase/fixtures/page_actions.py,sha256=
|
75
|
+
seleniumbase/fixtures/page_actions.py,sha256=zWjIYQmBuQMP25SiqIgM0UpaNTPHHHPkbmHB-shtdaU,73073
|
76
76
|
seleniumbase/fixtures/page_utils.py,sha256=H1iV8f9vDyEy87DBntyiBXC_tg8HskcebUOAJVn0hxE,12160
|
77
|
-
seleniumbase/fixtures/shared_utils.py,sha256=
|
77
|
+
seleniumbase/fixtures/shared_utils.py,sha256=HAjOSJQIGNG7wLbeBWAMy80x4l4stJjoxi-ZmHdzwMk,8702
|
78
78
|
seleniumbase/fixtures/unittest_helper.py,sha256=sfZ92rZeBAn_sF_yQ3I6_I7h3lyU5-cV_UMegBNoEm8,1294
|
79
79
|
seleniumbase/fixtures/words.py,sha256=FOA4mAYvl3EPVpBTvgvK6YwCL8BdlRCmed685kEe7Vg,7827
|
80
80
|
seleniumbase/fixtures/xpath_to_css.py,sha256=lML56k656fElXJ4NJF07r35FjctrbgQkXUotNk7A-as,8876
|
@@ -137,9 +137,9 @@ seleniumbase/utilities/selenium_grid/start-grid-hub.bat,sha256=Ftq-GrAKRYH2ssDPr
|
|
137
137
|
seleniumbase/utilities/selenium_grid/start-grid-hub.sh,sha256=KADv0RUHONLL2_I443QFK8PryBpDmKn5Gy0s4o0vDSM,106
|
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.42.0.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
141
|
+
seleniumbase-4.42.0.dist-info/METADATA,sha256=ymnowgVX4od6sNIdD-Uh3vZ6sUjZ3rLuPyrLdz5qtzI,89240
|
142
|
+
seleniumbase-4.42.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
143
|
+
seleniumbase-4.42.0.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
144
|
+
seleniumbase-4.42.0.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
145
|
+
seleniumbase-4.42.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|