Skip to content

Commit

Permalink
Avoid overriding capabilities with the defaults when using Firefox op…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
davehunt committed May 18, 2016
1 parent a5d890f commit e70ce52
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions py/selenium/webdriver/firefox/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# under the License.

from selenium.common.exceptions import WebDriverException
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile


Expand Down Expand Up @@ -87,14 +86,11 @@ def to_capabilities(self):
returns a dictionary with everything
"""
firefox = DesiredCapabilities.FIREFOX.copy()
firefox_options = self._firefox_options
required = {}
if self.binary_location:
firefox_options["binary"] = self.binary_location
required["binary"] = self.binary_location
if self._profile:
firefox_options["profile"] = self._profile.encoded
firefox_options["args"] = self.arguments

firefox["requiredCapabilities"] = firefox_options

return firefox
required["profile"] = self._profile.encoded
required["args"] = self.arguments
capabilities = {"requiredCapabilities": required}
return capabilities

0 comments on commit e70ce52

Please sign in to comment.