Skip to content

Commit

Permalink
fix selenium on circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkcl committed Nov 23, 2023
1 parent 9ba5e2b commit ef71eb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion doajtest/selenium_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef71eb2

Please sign in to comment.