From ef71eb27b9107190c2213a0fb1e8bfac078650e0 Mon Sep 17 00:00:00 2001 From: philip Date: Thu, 23 Nov 2023 17:29:26 +0000 Subject: [PATCH] fix selenium on circleci --- .circleci/config.yml | 8 ++++---- doajtest/selenium_helpers.py | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f7071a31f..e69207411d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -82,10 +82,10 @@ jobs: command: | TESTS=$(circleci tests glob "doajtest/seleniumtest/**/*.py" | circleci tests split) pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml $TESTS - - run: - name: Shutdown docker - command: | - docker-compose -f docker/docker-compose.yml down +# - run: +# name: Shutdown docker +# command: | +# docker-compose -f docker/docker-compose.yml down - store_test_results: path: test-results working_directory: ~/doaj diff --git a/doajtest/selenium_helpers.py b/doajtest/selenium_helpers.py index d986eeba97..8959a7c1d3 100644 --- a/doajtest/selenium_helpers.py +++ b/doajtest/selenium_helpers.py @@ -109,9 +109,12 @@ def setUp(self): options = webdriver.ChromeOptions() options.add_argument('--start-maximized') # maximize browser window options.add_argument('--ignore-certificate-errors') + options.add_argument('--ignore-ssl-errors') + options.add_argument('--allow-insecure-localhost') if self.app_test.config.get('SELENIUM_HEADLESS', False): options.add_argument('--headless') - browser_driver = webdriver.Chrome(options=options) + options.capabilities['acceptInsecureCerts'] = True + browser_driver = webdriver.Chrome(options=options, ) self.selenium = browser_driver self.selenium.maximize_window() # avoid something is not clickable