behave-framework/features/steps/browser_demo.py
Greg Gauthier 63fcdbc922
All checks were successful
Pylint / build (3.12) (push) Successful in 9s
fix code, update pylint, other goodies
2024-07-23 15:00:35 +01:00

35 lines
801 B
Python

# pylint: disable=no-name-in-module
from behave import then, when, given
from browserdriver import BrowserDriver
@given('I have a firefox driver')
def get_firefox_driver(context):
context.driver = BrowserDriver.get("firefox")
@given('I have a chrome driver')
def get_chrome_driver(context):
context.driver = BrowserDriver.get("chrome")
@given('I have an edge driver')
def get_edge_driver(context):
context.driver = BrowserDriver.get("edge")
@given('I have a safari driver')
def get_safari_driver(context):
context.driver = BrowserDriver.get("safari")
@when('I navigate to test.io')
def navigate_to_testio(context):
context.driver.get("https://test.io")
@then('The page is displayed')
def page_is_displayed(context):
assert context.driver.title == "Home | Test IO"