Skip to content

Instantly share code, notes, and snippets.

@AdrienLemaire
Created February 4, 2019 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdrienLemaire/0e835a254c056663f8341b69dee8bb87 to your computer and use it in GitHub Desktop.
Save AdrienLemaire/0e835a254c056663f8341b69dee8bb87 to your computer and use it in GitHub Desktop.
#features/environment.py
from behave import fixture
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from splinter.browser import Browser
@fixture(name="fixture.browser.chrome")
def splinter_browser(context):
context.browser = Browser(
driver_name="remote",
url="http://selenium-hub:4444/wd/hub",
**DesiredCapabilities.CHROME,
)
yield context.browser
context.browser.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment