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

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": if TEST_TYPE == "dev":
driver_func = partial( driver_func = partial(
webdriver.Firefox, 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, options=firefox_options,
) )
with webdriver.Firefox(options=firefox_options) as driver: with driver_func() as driver:
try: try:
driver.delete_all_cookies() driver.delete_all_cookies()
driver.maximize_window() driver.maximize_window()