Added some documentation

This commit is contained in:
Naomi
2018-09-26 16:18:57 +01:00
parent 17f0efd424
commit bc5cddb5ee
2 changed files with 13 additions and 0 deletions

View File

@ -22,8 +22,16 @@ TIMEOUT = 8
class SeleniumTest(LiveServerTestCase):
@classmethod
def setUpClass(cls):
### To test with firefox, uncomment these lines and comment those pertaining
### to Chrome. However, it will not work with GitLab CI because the docker
### container does not have the geckodriver installed.
# profile = webdriver.FirefoxProfile()
# profile.set_preference("dom.forms.number", False)
# cls.sl = webdriver.Firefox(profile)
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
# comment out this next line in order to see the tests running in a browser.
# But be sure to put it back before comitting, or gitlab CI will fail.
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
cls.sl = webdriver.Chrome(chrome_options=chrome_options)