Fix chromedriver issues, and run headless on travis (#310)

* Fix chromedriver issues, and run headless on travis

* Explicitly set chrome window size

* Use travis chrome

* Try chrome beta

* Update chromedriver

* Remove virtual display from travis config
This commit is contained in:
David Taylor
2017-09-22 14:24:20 +01:00
committed by GitHub
parent 7dd7378e6c
commit 131ff3e612
2 changed files with 8 additions and 15 deletions

View File

@@ -26,9 +26,13 @@ from django.conf import settings
import sys
def create_browser():
driver = webdriver.Chrome()
driver.maximize_window()
options = webdriver.ChromeOptions()
options.add_argument("--window-size=1920,1080")
if os.environ.get('CI', False):
options.add_argument("--headless")
driver = webdriver.Chrome(chrome_options=options)
return driver
class UserRegistrationTest(LiveServerTestCase):