tests - fix missing geckodriver log file in ui tests

This commit is contained in:
florian 2023-10-30 10:33:48 +01:00
parent 84eb947206
commit 7d69b91056
No known key found for this signature in database
GPG Key ID: 93EE47CC3D061500
1 changed files with 7 additions and 3 deletions

View File

@ -163,15 +163,19 @@ def access_page(
)
driver_func = partial(webdriver.Firefox, options=firefox_options)
driver_func = partial(
webdriver.Firefox,
service=Service(log_output="./geckodriver.log"),
options=firefox_options
)
if TEST_TYPE == "dev":
driver_func = partial(
webdriver.Firefox,
service=Service(Service(executable_path="./geckodriver" if "geckodriver" in listdir(Path.cwd()) else "/usr/local/bin/geckodriver", log_output="./geckodriver.log")),
service=Service(executable_path="./geckodriver" if "geckodriver" in listdir(Path.cwd()) else "/usr/local/bin/geckodriver", log_output="./geckodriver.log"),
options=firefox_options,
)
with webdriver.Firefox(options=firefox_options) as driver:
with driver_func() as driver:
try:
driver.delete_all_cookies()
driver.maximize_window()