Skip to content
Snippets Groups Projects
Verified Commit b5dae1c5 authored by Théo Pirkl's avatar Théo Pirkl :nail_care:
Browse files

A few bugfixes

parent b929c4f8
Branches
No related tags found
No related merge requests found
......@@ -14,11 +14,15 @@ from common.tasks.Runnable import Runnable
class StartBrowser(Runnable):
def run(self, parameters: dict) -> dict:
# Setting variables
exec_ext = "-mac" if platform.system() == "Darwin" else "-lin"
executable = env("RESOURCES_PATH") + "bin/geckodriver" + exec_ext
options = self.getBasicOptions()
profile = self.getBasicProfile(parameters['useProxy'])
# Running
os.environ["PATH"] += os.pathsep + env("RESOURCES_PATH") + "bin/"
driver = webdriver.Firefox(executable_path=executable, options=options, firefox_profile=profile)
return {'instance': driver}
......
......@@ -36,3 +36,4 @@ class Runner:
self.run(hasTriedbefore=True)
else:
logger.warning("Failed, again !")
raise e
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment