Skip to content

Commit

Permalink
Merge pull request #120 from ggozad/avoid-overwriting-desired-capabil…
Browse files Browse the repository at this point in the history
…ities

Check for desired_capabilities to avoid overwriting it
  • Loading branch information
ggozad authored Nov 9, 2022
2 parents d4324b7 + cdba7a3 commit edf88f6
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 edf88f6

Please sign in to comment.