Fix service creation_flag, custom driver path
- selenium.webdriver.common.service cant be used in this situation - Added check driver path, if not it will ignore the driver_execute_path
This commit is contained in:
parent
d29b3e300f
commit
bd5480e634
|
@ -440,7 +440,7 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
|||
self.browser_pid = browser.pid
|
||||
|
||||
if service_creationflags:
|
||||
service = selenium.webdriver.common.service.Service(
|
||||
service = selenium.webdriver.chrome.service.Service(
|
||||
self.patcher.executable_path, port, service_args, service_log_path
|
||||
)
|
||||
for attr_name in ("creationflags", "creation_flags"):
|
||||
|
|
|
@ -115,13 +115,14 @@ class Patcher(object):
|
|||
# self.user_multi_procs != -1:
|
||||
# # -1 being a skip value used later in this block
|
||||
#
|
||||
p = pathlib.Path(self.data_path)
|
||||
with Lock():
|
||||
files = list(p.rglob("*chromedriver*?"))
|
||||
for file in files:
|
||||
if self.is_binary_patched(file):
|
||||
self.executable_path = str(file)
|
||||
return True
|
||||
if not self._custom_exe_path:
|
||||
p = pathlib.Path(self.data_path)
|
||||
with Lock():
|
||||
files = list(p.rglob("*chromedriver*?"))
|
||||
for file in files:
|
||||
if self.is_binary_patched(file):
|
||||
self.executable_path = str(file)
|
||||
return True
|
||||
|
||||
if executable_path:
|
||||
self.executable_path = executable_path
|
||||
|
|
Loading…
Reference in New Issue