From 35ed2dae541e7a0f3624c063f738f1617f502af0 Mon Sep 17 00:00:00 2001 From: AutomatedTester Date: Wed, 11 Mar 2020 08:26:24 +0000 Subject: [PATCH] [py] Correct service usage in IE Binding. Fixes #7749 --- py/selenium/webdriver/ie/webdriver.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/py/selenium/webdriver/ie/webdriver.py b/py/selenium/webdriver/ie/webdriver.py index c15fc0cc80b4f..b534f2db38b59 100644 --- a/py/selenium/webdriver/ie/webdriver.py +++ b/py/selenium/webdriver/ie/webdriver.py @@ -89,14 +89,15 @@ def __init__(self, executable_path='IEDriverServer.exe', capabilities=None, else: # desired_capabilities stays as passed in capabilities.update(options.to_capabilities()) - if service is None: - service = Service() - self.iedriver = Service( - executable_path, - port=self.port, - host=self.host, - log_level=log_level, - log_file=service_log_path) + if service is not None: + self.iedriver = service + else: + self.iedriver = Service( + executable_path, + port=self.port, + host=self.host, + log_level=log_level, + log_file=service_log_path) self.iedriver.start()