seleniumbase 4.41.5__py3-none-any.whl → 4.41.6__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/fixtures/base_case.py +42 -0
- {seleniumbase-4.41.5.dist-info → seleniumbase-4.41.6.dist-info}/METADATA +11 -9
- {seleniumbase-4.41.5.dist-info → seleniumbase-4.41.6.dist-info}/RECORD +8 -8
- {seleniumbase-4.41.5.dist-info → seleniumbase-4.41.6.dist-info}/WHEEL +0 -0
- {seleniumbase-4.41.5.dist-info → seleniumbase-4.41.6.dist-info}/entry_points.txt +0 -0
- {seleniumbase-4.41.5.dist-info → seleniumbase-4.41.6.dist-info}/licenses/LICENSE +0 -0
- {seleniumbase-4.41.5.dist-info → seleniumbase-4.41.6.dist-info}/top_level.txt +0 -0
seleniumbase/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# seleniumbase package
|
2
|
-
__version__ = "4.41.
|
2
|
+
__version__ = "4.41.6"
|
@@ -7245,6 +7245,7 @@ class BaseCase(unittest.TestCase):
|
|
7245
7245
|
page_search = [page]
|
7246
7246
|
else:
|
7247
7247
|
page_search = None
|
7248
|
+
logging.getLogger("pdfminer").setLevel(logging.ERROR)
|
7248
7249
|
pdf_text = extract_text(
|
7249
7250
|
file_path,
|
7250
7251
|
password="",
|
@@ -7552,6 +7553,47 @@ class BaseCase(unittest.TestCase):
|
|
7552
7553
|
folder = constants.Files.DOWNLOADS_FOLDER
|
7553
7554
|
return page_utils._get_file_data(folder, file_name)
|
7554
7555
|
|
7556
|
+
def print_to_pdf(self, name, folder=None):
|
7557
|
+
"""Saves the current page as a PDF.
|
7558
|
+
If no folder is specified, uses the folder where pytest was called.
|
7559
|
+
If the folder provided doesn't exist, it will get created.
|
7560
|
+
@Params
|
7561
|
+
name - The name to give the PDF file. Must end in ".pdf".
|
7562
|
+
folder - The directory where you want to save the PDF."""
|
7563
|
+
import base64
|
7564
|
+
from selenium.webdriver.common.print_page_options import PrintOptions
|
7565
|
+
|
7566
|
+
if not name.lower().endswith(".pdf"):
|
7567
|
+
raise Exception('PDF name {%s} must end in ".pdf"!)' % name)
|
7568
|
+
download_file_lock = fasteners.InterProcessLock(
|
7569
|
+
constants.MultiBrowser.DOWNLOAD_FILE_LOCK
|
7570
|
+
)
|
7571
|
+
if self.__is_cdp_swap_needed():
|
7572
|
+
with download_file_lock:
|
7573
|
+
with suppress(Exception):
|
7574
|
+
shared_utils.make_writable(
|
7575
|
+
constants.MultiBrowser.DOWNLOAD_FILE_LOCK
|
7576
|
+
)
|
7577
|
+
if folder and not os.path.exists(folder):
|
7578
|
+
os.makedirs(folder)
|
7579
|
+
self.cdp.print_to_pdf(name, folder)
|
7580
|
+
return
|
7581
|
+
self.wait_for_ready_state_complete()
|
7582
|
+
print_options = PrintOptions()
|
7583
|
+
pdf_base64 = self.driver.print_page(print_options)
|
7584
|
+
with download_file_lock:
|
7585
|
+
with suppress(Exception):
|
7586
|
+
shared_utils.make_writable(
|
7587
|
+
constants.MultiBrowser.DOWNLOAD_FILE_LOCK
|
7588
|
+
)
|
7589
|
+
if folder and not os.path.exists(folder):
|
7590
|
+
os.makedirs(folder)
|
7591
|
+
filename = name
|
7592
|
+
if folder:
|
7593
|
+
filename = os.path.join(folder, name)
|
7594
|
+
with open(filename, "wb") as f:
|
7595
|
+
f.write(base64.b64decode(pdf_base64))
|
7596
|
+
|
7555
7597
|
def get_downloads_folder(self):
|
7556
7598
|
"""Returns the path of the SeleniumBase "downloaded_files/" folder.
|
7557
7599
|
Calling self.download_file(file_url) will put that file in here.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: seleniumbase
|
3
|
-
Version: 4.41.
|
3
|
+
Version: 4.41.6
|
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
|
@@ -75,7 +75,7 @@ Requires-Dist: filelock~=3.16.1; python_version < "3.9"
|
|
75
75
|
Requires-Dist: filelock>=3.19.1; python_version >= "3.9"
|
76
76
|
Requires-Dist: fasteners>=0.20
|
77
77
|
Requires-Dist: mycdp>=1.2.0
|
78
|
-
Requires-Dist: pynose>=1.5.
|
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
81
|
Requires-Dist: typing-extensions>=4.13.2
|
@@ -98,15 +98,15 @@ Requires-Dist: charset-normalizer<4,>=3.4.3
|
|
98
98
|
Requires-Dist: urllib3<2,>=1.26.20; python_version < "3.10"
|
99
99
|
Requires-Dist: urllib3<2.6.0,>=1.26.20; python_version >= "3.10"
|
100
100
|
Requires-Dist: requests==2.32.4; python_version < "3.9"
|
101
|
-
Requires-Dist: requests
|
101
|
+
Requires-Dist: requests~=2.32.5; python_version >= "3.9"
|
102
102
|
Requires-Dist: sniffio==1.3.1
|
103
103
|
Requires-Dist: h11==0.16.0
|
104
104
|
Requires-Dist: outcome==1.3.0.post0
|
105
105
|
Requires-Dist: trio==0.27.0; python_version < "3.9"
|
106
|
-
Requires-Dist: trio
|
107
|
-
Requires-Dist: trio-websocket
|
106
|
+
Requires-Dist: trio~=0.30.0; python_version >= "3.9"
|
107
|
+
Requires-Dist: trio-websocket~=0.12.2
|
108
108
|
Requires-Dist: wsproto==1.2.0
|
109
|
-
Requires-Dist: websocket-client
|
109
|
+
Requires-Dist: websocket-client~=1.8.0
|
110
110
|
Requires-Dist: selenium==4.27.1; python_version < "3.9"
|
111
111
|
Requires-Dist: selenium==4.32.0; python_version >= "3.9" and python_version < "3.10"
|
112
112
|
Requires-Dist: selenium==4.35.0; python_version >= "3.10"
|
@@ -145,7 +145,7 @@ Provides-Extra: coverage
|
|
145
145
|
Requires-Dist: coverage>=7.6.1; python_version < "3.9" and extra == "coverage"
|
146
146
|
Requires-Dist: coverage>=7.10.6; python_version >= "3.9" and extra == "coverage"
|
147
147
|
Requires-Dist: pytest-cov>=5.0.0; python_version < "3.9" and extra == "coverage"
|
148
|
-
Requires-Dist: pytest-cov>=
|
148
|
+
Requires-Dist: pytest-cov>=7.0.0; python_version >= "3.9" and extra == "coverage"
|
149
149
|
Provides-Extra: flake8
|
150
150
|
Requires-Dist: flake8==5.0.4; python_version < "3.9" and extra == "flake8"
|
151
151
|
Requires-Dist: flake8==7.3.0; python_version >= "3.9" and extra == "flake8"
|
@@ -165,8 +165,10 @@ Requires-Dist: pdfminer.six==20250324; python_version < "3.9" and extra == "pdfm
|
|
165
165
|
Requires-Dist: pdfminer.six==20250506; python_version >= "3.9" and extra == "pdfminer"
|
166
166
|
Requires-Dist: cryptography==39.0.2; python_version < "3.9" and extra == "pdfminer"
|
167
167
|
Requires-Dist: cryptography==45.0.7; python_version >= "3.9" and extra == "pdfminer"
|
168
|
-
Requires-Dist: cffi==1.17.1; extra == "pdfminer"
|
169
|
-
Requires-Dist:
|
168
|
+
Requires-Dist: cffi==1.17.1; python_version < "3.9" and extra == "pdfminer"
|
169
|
+
Requires-Dist: cffi==2.0.0; python_version >= "3.9" and extra == "pdfminer"
|
170
|
+
Requires-Dist: pycparser==2.22; python_version < "3.9" and extra == "pdfminer"
|
171
|
+
Requires-Dist: pycparser==2.23; python_version >= "3.9" and extra == "pdfminer"
|
170
172
|
Provides-Extra: pillow
|
171
173
|
Requires-Dist: Pillow>=10.4.0; python_version < "3.9" and extra == "pillow"
|
172
174
|
Requires-Dist: Pillow>=11.3.0; python_version >= "3.9" and extra == "pillow"
|
@@ -3,7 +3,7 @@ sbase/__main__.py,sha256=G0bVB1-DM4PGwQ1KyOupaWCs4ePbChZNNWuX2htim5U,647
|
|
3
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=ys7RbpJa5jmQLmHGvOoA4oggwlOShS76pELKLJHJyr4,46
|
7
7
|
seleniumbase/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
seleniumbase/behave/behave_helper.py,sha256=f4CdiSSYM3gMAicSKWJInkVGFwpGXtHMD8fikTehopQ,24291
|
9
9
|
seleniumbase/behave/behave_sb.py,sha256=guLihFsr1uJ4v2AR3r3Vy_BTeHrHwy2JEJxhp-MVnZA,59872
|
@@ -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=kebDf0oMhk1aDZmLsfI2MHL5gy2GKz7P5U5rwGAhCxI,739163
|
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.41.
|
141
|
-
seleniumbase-4.41.
|
142
|
-
seleniumbase-4.41.
|
143
|
-
seleniumbase-4.41.
|
144
|
-
seleniumbase-4.41.
|
145
|
-
seleniumbase-4.41.
|
140
|
+
seleniumbase-4.41.6.dist-info/licenses/LICENSE,sha256=BRblZsX7HyPUjQmYTiyWr_e9tzWvmR3R4SFclM2R3W0,1085
|
141
|
+
seleniumbase-4.41.6.dist-info/METADATA,sha256=_q0OEMgHW4Xfif-8RMAwN2aM7ilie9FyUpUZMcnL3Aw,87769
|
142
|
+
seleniumbase-4.41.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
143
|
+
seleniumbase-4.41.6.dist-info/entry_points.txt,sha256=CNrh2EKNaHYEhO6pP1RJyVLB99LkDDYX7TnUK8xfjqk,623
|
144
|
+
seleniumbase-4.41.6.dist-info/top_level.txt,sha256=4N97aBOQ8ETCnDnokBsWb07lJfTaq3C1ZzYRxvLMxqU,19
|
145
|
+
seleniumbase-4.41.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|