Skip to content

Commit

Permalink
Check for desired_capabilities to avoid overwriting it
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvinev committed Oct 11, 2022
1 parent ccd6604 commit cdba7a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/behaving/web/steps/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def named_browser(context, name):
if name not in context.browsers:
args = context.browser_args.copy()
if context.accept_ssl_certs:
args["desired_capabilities"] = {"acceptInsecureCerts": True}
if not hasattr(args, "desired_capabilities"):
args["desired_capabilities"] = {}
args["desired_capabilities"].update({"acceptInsecureCerts": True})
if context.remote_webdriver_url:
args["driver_name"] = "remote"
del args["headless"]
Expand Down

0 comments on commit cdba7a3

Please sign in to comment.