Skip to content

Commit

Permalink
Do not pass sessionId if it is not exists
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Tolfsen <ato@mozilla.com>
  • Loading branch information
bayandin authored and andreastt committed May 26, 2014
1 parent d834b32 commit 227674b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions py/selenium/webdriver/remote/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ def execute(self, driver_command, params=None):
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id

params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
Expand Down

0 comments on commit 227674b

Please sign in to comment.