Aloe: Selenium Webdriver extensions¶
aloe_webdriver provides utilities to help write Aloe BDD tests that run in the browser using Selenium webdriver.
Installing¶
pip install aloe_webdriver
Getting Started¶
Create a file in your steps/ directory, i.e. steps/browser.py and import the Aloe-Webdriver steps.
You are also responsible for building and maintaining the lifecycle of your
selenium.webdriver
referenced world.browser
.
from contextlib import contextmanager
import aloe_webdriver
from aloe import around, world
from selenium import webdriver
@around.all
@contextmanager
def with_browser():
world.browser = webdriver.Firefox()
yield
world.browser.quit()
delattr(world, 'browser')
History¶
Aloe-Webdriver originally started life as the library lettuce_webdriver. This is a fork of that library for Aloe.