Open DarshanUTHUK opened 3 months ago
as driver_name contains only a 'chromedriver'....its bettter check with extension also. where this path is used in drivers.json and also for driver executable_path .
@SergeyPirogov please look this issue with solutions which i have sent in this
as driver_name contains only a 'chromedriver'....its bettter check with extension also. where this path is used in drivers.json and also for driver executable_path .
I think this solution is only valid for Windows, but on MacOS and Linux there is no exe extension, so I don't think this type of control is a good idea
as driver_name contains only a 'chromedriver'....its bettter check with extension also. where this path is used in drivers.json and also for driver executable_path .
I think this solution is only valid for Windows, but on MacOS and Linux there is no exe extension, so I don't think this type of control is a good idea
Yeah got your point
what this code
def __get_binary(self, files, driver_name):
if not files:
raise Exception(f"Can't find binary for {driver_name} among {files}")
if len(files) == 1:
return files[0]
for f in files:
if 'LICENSE' in f:
continue
if driver_name in f:
driver_extension = "." + driver_name
if driver_extension not in f:
return f
raise Exception(f"Can't find binary for {driver_name} among {files}")
please check above code tell whether this can usefull
chrome_path = ChromeDriverManager().install()
if "THIRD_PARTY_NOTICES.chromedriver" in chrome_path:
chrome_path = chrome_path.replace("THIRD_PARTY_NOTICES.chromedriver", "chromedriver")
def __get_binary(self, files, driver_name): if not files: raise Exception(f"Can't find binary for {driver_name} among {files}")
we can update like this as follows:-