Univention Bugzilla – Bug 51525
ucs-test: Use selenium from debian buster
Last modified: 2021-05-25 16:00:37 CEST
ucs-test currently uses pip install selenium==3.6.0 because in stretch no debian package exists. In debian buster python-selenium 3.14.1+dfsg1-1 exists. We should use this instead.
The tests are failing with the exception: Traceback (most recent call last): File "12_product_test_ucr", line 214, in <module> with f as ucr_variable_file, selenium.UMCSeleniumTest() as s: File "/usr/lib/python2.7/dist-packages/univention/testing/selenium/base.py", line 123, in __enter__ self.driver.execute_script('document.cookie = "UMCLang=%s; path=/univention/"' % (self.language,)) File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 636, in execute_script 'args': converted_args})['value'] File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: <unknown>: Failed to set the 'cookie' property on 'Document': Access is denied for this document. (Session info: chrome=80.0.3987.162) I will try to try-except this, I hope the the language is then set nevertheless.
We could instead fix Bug #44718
Created attachment 10406 [details] Screenshot The tests now fail with the above screenshot: Chromium doesn't accept the self-signed certificate anymore.
The Tests now use Selenium from debian buster and are in general working again. ucs-test (10.0.0-20) | Bug #51525: open traceback panes | Bug #51525: selenium+chrome: ignore unknown certificates | Bug #51525: try to workaround selenium change? | Bug #51525: try to workaround chromium bug | Bug #51525: replace pip selenium with python-selenium univention-appcenter (9.0.0-4) | Bug #51525: replace pip selenium with python-selenium
Johannes noticed also this traceback with Python 2 only: Traceback (most recent call last): File "134_side_menu", line 33, in <module> with selenium.UMCSeleniumTest() as s: File "/usr/lib/python2.7/dist-packages/univention/testing/selenium/base.py", line 108, in __enter__ self.driver = webdriver.Chrome(chrome_options=chrome_options) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 151, in __init__ self.start_session(desired_capabilities, browser_profile) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 240, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute self.error_handler.check_response(response) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
verified: - code changes seems plausible - ucs-test-selenium-runner is installed instead of pip selenium package - ucs-test-selenium-runner seems to have correct python selenium dependencies - the test "134_side_menu" and "12_product_test_ucr" do not fail in Jenkins as far as I can see
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".