Skip to content

Commit

Permalink
Use W3C check from parent object instead of assuming from capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Apr 13, 2017
1 parent 66c896d commit 01ac9f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions py/selenium/webdriver/firefox/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def __init__(self, firefox_profile=None, firefox_binary=None,
self.binary = None
self.profile = None
self.service = None
self._w3c = False

if capabilities is None:
capabilities = DesiredCapabilities.FIREFOX.copy()
Expand Down Expand Up @@ -138,8 +137,7 @@ def __init__(self, firefox_profile=None, firefox_binary=None,
# TODO(ato): Perform conformance negotiation

if capabilities.get("marionette"):
self._w3c = True

capabilities.pop("marionette")
self.service = Service(executable_path, log_path=log_path)
self.service.start()

Expand Down Expand Up @@ -186,7 +184,7 @@ def quit(self):
# the socket.
pass

if self._w3c:
if self.w3c:
self.service.stop()
else:
self.binary.kill()
Expand Down

0 comments on commit 01ac9f8

Please sign in to comment.