From 4d9d95366385a48e9a963962b41e073fadb38604 Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Thu, 7 Dec 2017 17:17:23 +0100 Subject: [PATCH] Extend ui_driver to support geckodriver log_path Geckodriver automatically logs into geckodriver.log file which is placed in the same directory from which tests are run. In case of running tests using ipa-run-tests the current working directory is /usr/lib/python*/site-packages/ipatests where most of users cannot write because of priviledges. By adding "geckodriver_log_path" into test configuration we allow to set path where user who run tests have priviledges to write. Config file might be seen here: https://www.freeipa.org/page/Web_UI_Integration_Tests#Running_tests Fixes: https://pagure.io/freeipa/issue/7311 Reviewed-By: Christian Heimes --- ipatests/test_webui/ui_driver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 2cd2ba86a..b7a234776 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -218,7 +218,8 @@ class UI_driver(object): fp = None if "ff_profile" in self.config: fp = webdriver.FirefoxProfile(self.config["ff_profile"]) - driver = webdriver.Firefox(fp) + ff_log_path = self.config.get("geckodriver_log_path") + driver = webdriver.Firefox(fp, log_path=ff_log_path) except URLError as e: raise nose.SkipTest('Error connecting to selenium server: %s' % e) except RuntimeError as e: