Skip to content

Commit 3c0728a

Browse files
committed
Explicit headless option instead of env var
1 parent b8e6f64 commit 3c0728a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.travis.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ before_install:
1717
- export PATH=$PATH:$PWD/geckodriver
1818

1919
env:
20-
matrix:
21-
- DJANGO=1.8
22-
- DJANGO=1.9
23-
- DJANGO=1.10
24-
- DJANGO=1.11
25-
global:
26-
- MOZ_HEADLESS=1
20+
- DJANGO=1.8
21+
- DJANGO=1.9
22+
- DJANGO=1.10
23+
- DJANGO=1.11
2724

2825
matrix:
2926
fast_finish: true

testapp/tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from selenium.webdriver import Firefox
99
from selenium.webdriver.common.by import By
1010
from selenium.webdriver.common.keys import Keys
11+
from selenium.webdriver.firefox.options import Options
1112
from selenium.webdriver.support import expected_conditions as EC
1213
from selenium.webdriver.support.ui import WebDriverWait
1314

@@ -65,7 +66,9 @@ def test_extra_attrs(self):
6566

6667
class AcceptanceTest(StaticLiveServerTestCase):
6768
def setUp(self):
68-
self.driver = Firefox()
69+
options = Options()
70+
options.add_argument('-headless')
71+
self.driver = Firefox(firefox_options=options)
6972

7073
def tearDown(self):
7174
self.driver.quit()

0 commit comments

Comments
 (0)