Switched selenium from using firefox to using chrome

This commit is contained in:
Naomi 2018-09-26 15:38:56 +01:00
parent 807bf87351
commit 949dca4abb

View File

@ -22,9 +22,12 @@ TIMEOUT = 8
class SeleniumTest(LiveServerTestCase):
@classmethod
def setUpClass(cls):
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')
cls.sl = webdriver.Chrome(chrome_options=chrome_options)
# profile = webdriver.FirefoxProfile()
# profile.set_preference("dom.forms.number", False)
# cls.sl = webdriver.Firefox(profile)
cls.sl.implicitly_wait(TIMEOUT)
super(SeleniumTest, cls).setUpClass()