Skip to content

Commit

Permalink
Add service_args to Firefox WebDriver (#5421)
Browse files Browse the repository at this point in the history
The Firefox Geckodirver Service accepts the service_args parameter,
but there is no way of passing those service arguments from the
Firefox WebDriver.

Fixes #5420
  • Loading branch information
moiseshiraldo authored and lmtierney committed Feb 1, 2018
1 parent c1beae5 commit ba2fa95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions py/selenium/webdriver/firefox/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class WebDriver(RemoteWebDriver):
def __init__(self, firefox_profile=None, firefox_binary=None,
timeout=30, capabilities=None, proxy=None,
executable_path="geckodriver", options=None,
log_path="geckodriver.log", firefox_options=None):
log_path="geckodriver.log", firefox_options=None,
service_args=None):
"""Starts a new local session of Firefox.
Based on the combination and specificity of the various keyword
Expand Down Expand Up @@ -144,7 +145,10 @@ def __init__(self, firefox_profile=None, firefox_binary=None,

if capabilities.get("marionette"):
capabilities.pop("marionette")
self.service = Service(executable_path, log_path=log_path)
self.service = Service(
executable_path,
service_args=service_args,
log_path=log_path)
self.service.start()

capabilities.update(options.to_capabilities())
Expand Down

0 comments on commit ba2fa95

Please sign in to comment.