File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 22Environment for Behave Testing
33"""
44
5- from os import getenv
5+ import os
66from selenium import webdriver
77
8- WAIT_SECONDS = int (getenv ("WAIT_SECONDS" , "30" ))
9- BASE_URL = getenv ("BASE_URL" , "http://localhost:8080" )
10- DRIVER = getenv ("DRIVER" , "firefox" ).lower ()
8+ WAIT_SECONDS = int (os . getenv ("WAIT_SECONDS" , "30" ))
9+ BASE_URL = os . getenv ("BASE_URL" , "http://localhost:8080" )
10+ DRIVER = os . getenv ("DRIVER" , "firefox" ).lower ()
1111
1212
1313def before_all (context ):
@@ -47,8 +47,8 @@ def get_chrome():
4747def get_firefox ():
4848 """Creates a headless Firefox driver"""
4949 print ("Running Behave using the Firefox driver...\n " )
50+ # Set the environment variable for the Selenium WebDriver
51+ os .environ ["SELENIUM_DRIVER" ] = "geckodriver"
5052 options = webdriver .FirefoxOptions ()
51- options .add_argument ("--no-sandbox" )
52- options .add_argument ("--disable-dev-shm-usage" )
5353 options .add_argument ("--headless" )
5454 return webdriver .Firefox (options = options )
You can’t perform that action at this time.
0 commit comments