Skip to content

Commit

Permalink
Explicitly set gekodriver in environment
Browse files Browse the repository at this point in the history
Signed-off-by: John Rofrano <[email protected]>
  • Loading branch information
rofrano committed Dec 11, 2024
1 parent a30991d commit 0f9a1f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Environment for Behave Testing
"""

from os import getenv
import os
from selenium import webdriver

WAIT_SECONDS = int(getenv("WAIT_SECONDS", "30"))
BASE_URL = getenv("BASE_URL", "http://localhost:8080")
DRIVER = getenv("DRIVER", "firefox").lower()
WAIT_SECONDS = int(os.getenv("WAIT_SECONDS", "30"))
BASE_URL = os.getenv("BASE_URL", "http://localhost:8080")
DRIVER = os.getenv("DRIVER", "firefox").lower()


def before_all(context):
Expand Down Expand Up @@ -47,8 +47,8 @@ def get_chrome():
def get_firefox():
"""Creates a headless Firefox driver"""
print("Running Behave using the Firefox driver...\n")
# Set the environment variable for the Selenium WebDriver
os.environ["SELENIUM_DRIVER"] = "geckodriver"
options = webdriver.FirefoxOptions()
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--headless")
return webdriver.Firefox(options=options)

0 comments on commit 0f9a1f9

Please sign in to comment.