seleniumbase 4.40.1__py3-none-any.whl → 4.40.2__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.
- sbase/steps.py +9 -0
- seleniumbase/__version__.py +1 -1
- seleniumbase/behave/behave_helper.py +2 -0
- seleniumbase/core/recorder_helper.py +3 -0
- seleniumbase/fixtures/base_case.py +36 -0
- {seleniumbase-4.40.1.dist-info → seleniumbase-4.40.2.dist-info}/METADATA +2 -2
- {seleniumbase-4.40.1.dist-info → seleniumbase-4.40.2.dist-info}/RECORD +11 -11
- {seleniumbase-4.40.1.dist-info → seleniumbase-4.40.2.dist-info}/WHEEL +0 -0
- {seleniumbase-4.40.1.dist-info → seleniumbase-4.40.2.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.40.1.dist-info → seleniumbase-4.40.2.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.40.1.dist-info → seleniumbase-4.40.2.dist-info}/top_level.txt +0 -0
sbase/steps.py
CHANGED
@@ -1191,6 +1191,15 @@ def set_attributes(context, selector, attribute, value):
|
|
1191
1191
|
sb.set_attributes(selector, attribute, value)
|
1192
1192
|
|
1193
1193
|
|
1194
|
+
@step("Save page source to logs")
|
1195
|
+
@step("Save the page source to the logs")
|
1196
|
+
@step("User saves page source to logs")
|
1197
|
+
@step("User saves the page source to the logs")
|
1198
|
+
def save_page_source_to_logs(context):
|
1199
|
+
sb = context.sb
|
1200
|
+
sb.save_page_source_to_logs()
|
1201
|
+
|
1202
|
+
|
1194
1203
|
@step("Activate CDP Mode")
|
1195
1204
|
@step("User activates CDP Mode")
|
1196
1205
|
def activate_cdp_mode(context):
|
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.40.
|
2
|
+
__version__ = "4.40.2"
|
@@ -522,6 +522,8 @@ def generate_gherkin(srt_actions):
|
|
522
522
|
)
|
523
523
|
elif action[0] == "ss_tl":
|
524
524
|
sb_actions.append("Save screenshot to logs")
|
525
|
+
elif action[0] == "spstl":
|
526
|
+
sb_actions.append("Save page source to logs")
|
525
527
|
elif action[0] == "sh_fc":
|
526
528
|
sb_actions.append("Show file choosers")
|
527
529
|
elif action[0] == "pr_da":
|
@@ -556,6 +556,9 @@ def generate_sbase_code(srt_actions):
|
|
556
556
|
elif action[0] == "ss_tl":
|
557
557
|
method = "save_screenshot_to_logs"
|
558
558
|
sb_actions.append("self.%s()" % method)
|
559
|
+
elif action[0] == "spstl":
|
560
|
+
method = "save_page_source_to_logs"
|
561
|
+
sb_actions.append("self.%s()" % method)
|
559
562
|
elif action[0] == "sh_fc":
|
560
563
|
method = "show_file_choosers"
|
561
564
|
sb_actions.append("self.%s()" % method)
|
@@ -132,6 +132,7 @@ class BaseCase(unittest.TestCase):
|
|
132
132
|
self.__called_teardown = False
|
133
133
|
self.__start_time_ms = int(time.time() * 1000.0)
|
134
134
|
self.__requests_timeout = None
|
135
|
+
self.__page_source_count = 0
|
135
136
|
self.__screenshot_count = 0
|
136
137
|
self.__logs_data_count = 0
|
137
138
|
self.__last_data_file = None
|
@@ -4512,6 +4513,40 @@ class BaseCase(unittest.TestCase):
|
|
4512
4513
|
sb_config._has_logs = True
|
4513
4514
|
return page_actions.save_screenshot(self.driver, name, test_logpath)
|
4514
4515
|
|
4516
|
+
def save_page_source_to_logs(self, name=None):
|
4517
|
+
"""Saves the page HTML to the "latest_logs/" folder.
|
4518
|
+
Naming is automatic:
|
4519
|
+
If NO NAME provided: "_1_source.html", "_2_source.html", etc.
|
4520
|
+
If NAME IS provided, then: "_1_name.html", "_2_name.html", etc.
|
4521
|
+
(The last_page / failure page_source is always "page_source.html")"""
|
4522
|
+
if not self.__is_cdp_swap_needed():
|
4523
|
+
self.wait_for_ready_state_complete()
|
4524
|
+
test_logpath = os.path.join(self.log_path, self.__get_test_id())
|
4525
|
+
self.__create_log_path_as_needed(test_logpath)
|
4526
|
+
if name:
|
4527
|
+
name = str(name)
|
4528
|
+
self.__page_source_count += 1
|
4529
|
+
if not name or len(name) == 0:
|
4530
|
+
name = "_%s_source.html" % self.__page_source_count
|
4531
|
+
else:
|
4532
|
+
pre_name = "_%s_" % self.__page_source_count
|
4533
|
+
if len(name) >= 4 and name[-4:].lower() == ".html":
|
4534
|
+
name = name[:-4]
|
4535
|
+
if len(name) == 0:
|
4536
|
+
name = "source"
|
4537
|
+
name = "%s%s.html" % (pre_name, name)
|
4538
|
+
if self.recorder_mode:
|
4539
|
+
url = self.get_current_url()
|
4540
|
+
if url and len(url) > 0:
|
4541
|
+
if ("http:") in url or ("https:") in url or ("file:") in url:
|
4542
|
+
if self.get_session_storage_item("pause_recorder") == "no":
|
4543
|
+
time_stamp = self.execute_script("return Date.now();")
|
4544
|
+
origin = self.get_origin()
|
4545
|
+
action = ["spstl", "", origin, time_stamp]
|
4546
|
+
self.__extra_actions.append(action)
|
4547
|
+
sb_config._has_logs = True
|
4548
|
+
return page_actions.save_page_source(self.driver, name, test_logpath)
|
4549
|
+
|
4515
4550
|
def save_data_to_logs(self, data, file_name=None):
|
4516
4551
|
"""Saves data to the "latest_logs/" data folder of the current test.
|
4517
4552
|
If no file_name, file_name becomes: "data_1.txt", "data_2.txt", etc.
|
@@ -5470,6 +5505,7 @@ class BaseCase(unittest.TestCase):
|
|
5470
5505
|
ext_actions.append("s_scr")
|
5471
5506
|
ext_actions.append("ss_tf")
|
5472
5507
|
ext_actions.append("ss_tl")
|
5508
|
+
ext_actions.append("spstl")
|
5473
5509
|
ext_actions.append("da_el")
|
5474
5510
|
ext_actions.append("da_ep")
|
5475
5511
|
ext_actions.append("da_te")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.40.
|
3
|
+
Version: 4.40.2
|
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
|
@@ -108,7 +108,7 @@ Requires-Dist: wsproto==1.2.0
|
|
108
108
|
Requires-Dist: websocket-client==1.8.0
|
109
109
|
Requires-Dist: selenium==4.27.1; python_version < "3.9"
|
110
110
|
Requires-Dist: selenium==4.32.0; python_version >= "3.9" and python_version < "3.10"
|
111
|
-
Requires-Dist: selenium==4.34.
|
111
|
+
Requires-Dist: selenium==4.34.2; python_version >= "3.10"
|
112
112
|
Requires-Dist: cssselect==1.2.0; python_version < "3.9"
|
113
113
|
Requires-Dist: cssselect==1.3.0; python_version >= "3.9"
|
114
114
|
Requires-Dist: sortedcontainers==2.4.0
|
@@ -1,11 +1,11 @@
|
|
1
1
|
sbase/__init__.py,sha256=02izDj786GVBT0bpSq2Q2O8uwSxtyT09pnobZz91ML8,605
|
2
2
|
sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
3
|
-
sbase/steps.py,sha256=
|
3
|
+
sbase/steps.py,sha256=EdJyNVJ1yxoHsc7qp8kzx0EESIkOh_033yLCvmaPcs4,43281
|
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=c2RgolHwAg4xXI7aapOCEu0FuBUHzqqKm-ydLs6RvoA,46
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
seleniumbase/behave/behave_helper.py,sha256=
|
8
|
+
seleniumbase/behave/behave_helper.py,sha256=f4CdiSSYM3gMAicSKWJInkVGFwpGXtHMD8fikTehopQ,24291
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=guLihFsr1uJ4v2AR3r3Vy_BTeHrHwy2JEJxhp-MVnZA,59872
|
10
10
|
seleniumbase/behave/steps.py,sha256=8-N-NB2tnDsxaP4LSg-uSBgbwZYMS6ZEL1oggO1PCoU,390
|
11
11
|
seleniumbase/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -47,7 +47,7 @@ seleniumbase/core/jqc_helper.py,sha256=2DDQr9Q2jSSZqFzX588jLlUM9oJvyrRWq2aORSIPU
|
|
47
47
|
seleniumbase/core/log_helper.py,sha256=JvB3FyOJJkVAP5RZXUuap468LIacqlO1UsqtEAVTfG4,23612
|
48
48
|
seleniumbase/core/mysql.py,sha256=X1McqBWCzN9DndyBbNrVg9_kvtaByVhodiXYkGbn36A,3955
|
49
49
|
seleniumbase/core/proxy_helper.py,sha256=pZ1NboNfziHU3vWZLOZLX-qkfM3oKSnpc3omQf9EUQQ,8809
|
50
|
-
seleniumbase/core/recorder_helper.py,sha256=
|
50
|
+
seleniumbase/core/recorder_helper.py,sha256=OBqNiCC_11ctpsD72KV4YUaKovmSpvs14HP1gwFesBA,25190
|
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=2KYfNQQBjUa_o2oMaGlzmHpGuvz-SJ9baGfxVyjOCSM,94104
|
@@ -67,7 +67,7 @@ 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=cYPGF9mO2Asqxc3k03JprgIVCxGnL17NM3jex4ueG9c,736843
|
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
|
@@ -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.40.
|
141
|
-
seleniumbase-4.40.
|
142
|
-
seleniumbase-4.40.
|
143
|
-
seleniumbase-4.40.
|
144
|
-
seleniumbase-4.40.
|
145
|
-
seleniumbase-4.40.
|
140
|
+
seleniumbase-4.40.2.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
141
|
+
seleniumbase-4.40.2.dist-info/METADATA,sha256=2nVYjycON5dy9g2PHbG3Cr9ZGCaUg9wOIO4EmQJdPh4,87295
|
142
|
+
seleniumbase-4.40.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
143
|
+
seleniumbase-4.40.2.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
144
|
+
seleniumbase-4.40.2.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
145
|
+
seleniumbase-4.40.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|