Skip to content

Shortcuts and dependencies #3629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mkdocs_build/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.36.1"
__version__ = "4.36.2"
20 changes: 20 additions & 0 deletions seleniumbase/fixtures/base_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -3993,6 +3993,7 @@ def get_new_driver(
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
Expand Down Expand Up @@ -4081,13 +4082,20 @@ def get_new_driver(
" 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
if headless is None:
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:
Expand Down Expand Up @@ -4130,6 +4138,8 @@ def get_new_driver(
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:
Expand All @@ -4144,8 +4154,12 @@ def get_new_driver(
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:
Expand Down Expand Up @@ -4182,8 +4196,12 @@ def get_new_driver(
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()
Expand All @@ -4193,6 +4211,8 @@ def get_new_driver(
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:
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
'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",
Expand All @@ -177,7 +177,7 @@
'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',
Expand Down Expand Up @@ -259,7 +259,7 @@
# 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',
Expand Down