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 2
2
Environment for Behave Testing
3
3
"""
4
4
5
- from os import getenv
5
+ import os
6
6
from selenium import webdriver
7
7
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 ()
11
11
12
12
13
13
def before_all (context ):
@@ -47,8 +47,8 @@ def get_chrome():
47
47
def get_firefox ():
48
48
"""Creates a headless Firefox driver"""
49
49
print ("Running Behave using the Firefox driver...\n " )
50
+ # Set the environment variable for the Selenium WebDriver
51
+ os .environ ["SELENIUM_DRIVER" ] = "geckodriver"
50
52
options = webdriver .FirefoxOptions ()
51
- options .add_argument ("--no-sandbox" )
52
- options .add_argument ("--disable-dev-shm-usage" )
53
53
options .add_argument ("--headless" )
54
54
return webdriver .Firefox (options = options )
You can’t perform that action at this time.
0 commit comments