Merge pull request #3629 from seleniumbase/shortcuts-and-dependencies

Shortcuts and dependencies
This commit is contained in:
Michael Mintz 2025-03-25 16:26:24 -04:00 committed by GitHub
commit 413a762e6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 27 additions and 7 deletions

View File

@ -3,7 +3,7 @@
regex>=2024.11.6
pymdown-extensions>=10.14.3
pipdeptree>=2.25.1
pipdeptree>=2.26.0
python-dateutil>=2.8.2
Markdown==3.7
click==8.1.8

View File

@ -1,7 +1,7 @@
pip>=25.0.1
packaging>=24.2
setuptools~=70.2;python_version<"3.10"
setuptools>=77.0.3;python_version>="3.10"
setuptools>=78.0.2;python_version>="3.10"
wheel>=0.45.1
attrs>=25.3.0
certifi>=2025.1.31
@ -28,7 +28,7 @@ pyyaml>=6.0.2
pygments>=2.19.1
pyreadline3>=3.5.3;platform_system=="Windows"
tabcompleter>=1.4.0
pdbp>=1.6.1
pdbp>=1.7.0
idna==3.10
chardet==5.2.0
charset-normalizer==3.4.1

View File

@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.36.1"
__version__ = "4.36.2"

View File

@ -3993,6 +3993,7 @@ class BaseCase(unittest.TestCase):
d_width=None,
d_height=None,
d_p_r=None,
**kwargs,
):
"""This method spins up an extra browser for tests that require
more than one. The first browser is already provided by tests
@ -4081,6 +4082,11 @@ class BaseCase(unittest.TestCase):
" for examples!)"
% (browserstack_ref, sauce_labs_ref)
)
shortcuts = ["dark", "guest", "locale", "mobile", "pls", "uc", "wire"]
if kwargs:
for key in kwargs.keys():
if key not in shortcuts:
raise TypeError("Unexpected keyword argument '%s'" % key)
if browser is None:
browser = self.browser
browser_name = browser
@ -4088,6 +4094,8 @@ class BaseCase(unittest.TestCase):
headless = self.headless
if locale_code is None:
locale_code = self.locale_code
if "locale" in kwargs and not locale_code:
locale_code = kwargs["locale"]
if protocol is None:
protocol = self.protocol
if servername is None:
@ -4130,6 +4138,8 @@ class BaseCase(unittest.TestCase):
uc_cdp_events = self.uc_cdp_events
if uc_subprocess is None:
uc_subprocess = self.uc_subprocess
if "uc" in kwargs and not undetectable:
undetectable = kwargs["uc"]
if log_cdp_events is None:
log_cdp_events = self.log_cdp_events
if no_sandbox is None:
@ -4144,8 +4154,12 @@ class BaseCase(unittest.TestCase):
incognito = self.incognito
if guest_mode is None:
guest_mode = self.guest_mode
if "guest" in kwargs and not guest_mode:
guest_mode = kwargs["guest"]
if dark_mode is None:
dark_mode = self.dark_mode
if "dark" in kwargs and not dark_mode:
dark_mode = kwargs["dark"]
if devtools is None:
devtools = self.devtools
if remote_debug is None:
@ -4182,8 +4196,12 @@ class BaseCase(unittest.TestCase):
driver_version = self.driver_version
if page_load_strategy is None:
page_load_strategy = self.page_load_strategy
if "pls" in kwargs and not page_load_strategy:
page_load_strategy = kwargs["pls"]
if use_wire is None:
use_wire = self.use_wire
if "wire" in kwargs and not use_wire:
use_wire = kwargs["wire"]
if external_pdf is None:
external_pdf = self.external_pdf
test_id = self.__get_test_id()
@ -4193,6 +4211,8 @@ class BaseCase(unittest.TestCase):
cap_string = self.cap_string
if is_mobile is None:
is_mobile = self.mobile_emulator
if "mobile" in kwargs and not is_mobile:
is_mobile = kwargs["mobile"]
if d_width is None:
d_width = self.__device_width
if d_height is None:

View File

@ -150,7 +150,7 @@ setup(
'pip>=25.0.1',
'packaging>=24.2',
'setuptools~=70.2;python_version<"3.10"', # Newer ones had issues
'setuptools>=77.0.3;python_version>="3.10"',
'setuptools>=78.0.2;python_version>="3.10"',
'wheel>=0.45.1',
'attrs>=25.3.0',
"certifi>=2025.1.31",
@ -177,7 +177,7 @@ setup(
'pygments>=2.19.1',
'pyreadline3>=3.5.3;platform_system=="Windows"',
"tabcompleter>=1.4.0",
"pdbp>=1.6.1",
"pdbp>=1.7.0",
"idna==3.10",
'chardet==5.2.0',
'charset-normalizer==3.4.1',
@ -259,7 +259,7 @@ setup(
# pip install -e .[pdfminer]
# (An optional library for parsing PDF files.)
"pdfminer": [
'pdfminer.six==20240706',
'pdfminer.six==20250324',
'cryptography==39.0.2;python_version<"3.9"',
'cryptography==44.0.2;python_version>="3.9"',
'cffi==1.17.1',