2020-10-09 17:34:54 +00:00
|
|
|
from behave import then, when, given
|
|
|
|
|
|
|
|
from browserdriver import BrowserDriver
|
|
|
|
|
|
|
|
|
2020-10-10 18:04:35 +00:00
|
|
|
@given('I have a firefox driver')
|
|
|
|
def step_impl(context):
|
|
|
|
context.driver = BrowserDriver.get("firefox")
|
|
|
|
|
|
|
|
|
2020-10-09 17:34:54 +00:00
|
|
|
@given('I have a chrome driver')
|
|
|
|
def step_impl(context):
|
|
|
|
context.driver = BrowserDriver.get("chrome")
|
|
|
|
|
|
|
|
|
|
|
|
@when('I navigate to test.io')
|
|
|
|
def step_impl(context):
|
|
|
|
context.driver.get("https://test.io")
|
2020-10-09 20:07:44 +00:00
|
|
|
print(context.driver.title)
|
2020-10-09 17:34:54 +00:00
|
|
|
|
2020-10-10 18:04:35 +00:00
|
|
|
|
2020-10-09 17:34:54 +00:00
|
|
|
@then('The page is displayed')
|
|
|
|
def step_impl(context):
|
|
|
|
assert context.driver.title == "QA Testing as a Service | test IO"
|