Skip to content
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

Mutable default value 1817 #1859

Merged
merged 5 commits into from
Nov 18, 2023
Merged
Changes from 2 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
4 changes: 3 additions & 1 deletion src/SeleniumLibrary/keywords/browsermanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def _make_new_browser(

@keyword
def create_webdriver(
self, driver_name: str, alias: Optional[str] = None, kwargs={}, **init_kwargs
self, driver_name: str, alias: Optional[str] = None, kwargs=None, **init_kwargs
emanlove marked this conversation as resolved.
Show resolved Hide resolved
) -> str:
"""Creates an instance of Selenium WebDriver.

Expand Down Expand Up @@ -371,6 +371,8 @@ def create_webdriver(
`Close All Browsers` keyword is used. See `Switch Browser` for an
example.
"""
if kwargs is None:
kwargs = {}
if not isinstance(kwargs, dict):
raise RuntimeError("kwargs must be a dictionary.")
Snooz82 marked this conversation as resolved.
Show resolved Hide resolved
for arg_name in kwargs:
Expand Down
Loading