Skip to content

Commit

Permalink
support headless
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkcl committed Nov 23, 2023
1 parent 045afe4 commit c1407c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
command: |
echo "SELENIUM_REMOTE_URL = ''" >> test.cfg
echo "SELENIUM_DOAJ_HOST = '127.0.0.1'" >> test.cfg
echo "SELENIUM_HEADLESS = True" >> test.cfg
# - run:
# name: Install Dcoker Compose
# environment:
Expand Down
2 changes: 2 additions & 0 deletions doajtest/selenium_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def setUp(self):
# run selenium with your local browser
options = webdriver.ChromeOptions()
options.add_argument('--start-maximized') # maximize browser window
if self.app_test.config.get('SELENIUM_HEADLESS', False):
options.add_argument('--headless')
browser_driver = webdriver.Chrome(options=options)

self.selenium = browser_driver
Expand Down

0 comments on commit c1407c4

Please sign in to comment.