Skip to content

Commit 0f9a1f9

Browse files
committed
Explicitly set gekodriver in environment
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
1 parent a30991d commit 0f9a1f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

features/environment.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Environment for Behave Testing
33
"""
44

5-
from os import getenv
5+
import os
66
from 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

1313
def before_all(context):
@@ -47,8 +47,8 @@ def get_chrome():
4747
def 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)

0 commit comments

Comments
 (0)