Exemplo n.º 1
0
def step_impl(context, text):
    login_page = LoginPage(context.driver)
    for row in context.table:
        login_page.enter_username(row["username"])
        login_page.enter_password(row["password"])
        login_page.click_login()
        base_page = BasePage(context.driver)
        base_page.see_element_with_text(text)
Exemplo n.º 2
0
def before_scenario(context, scenario):
    context.driver = webdriver.Chrome()
    context.driver.maximize_window()
    context.driver.implicitly_wait(2)
    context.driver.get("http://automationpractice.com")

    if "skip" in scenario.tags:
        scenario.skip("Marked with @skip")
        return
    if "base_page" in scenario.tags:
        context.base_page = BasePage(context.driver)
    if "home_page" in scenario.tags:
        context.home_page = HomePage(context.driver)
    if "authentication_page" in scenario.tags:
        context.authentication_page = AuthenticationPage(context.driver)
    if "registration_page" in scenario.tags:
        context.registration_page = RegistrationPage(context.driver)
    if "checkout_page" in scenario.tags:
        context.checkout_page = CheckoutPage(context.driver)
    if "summary_page" in scenario.tags:
        context.summary_page = SummaryPage(context.driver)
    if "address_page" in scenario.tags:
        context.address_page = AddressPage(context.driver)
    if "shipping_page" in scenario.tags:
        context.shipping_page = ShippingPage(context.driver)
    if "payment_page" in scenario.tags:
        context.payment_page = PaymentPage(context.driver)
def before_all(context):
    context.browser = webdriver.Chrome()
    context.browser.implicitly_wait(30)
    context.browser.set_page_load_timeout(30)
    context.browser.maximize_window()

    context.login_page = LoginPage(context.browser)
    context.overview_page = OverviewPage(context.browser)
    context.base_page = BasePage(context.browser)
 def __init__(self, context):
     BasePage.__init__(self, context.browser, base_url=settings['url'])
Exemplo n.º 5
0
def prepare_pages(context, driver):
    context.base_page = BasePage(driver)
    context.home_page = HomePage(driver)
    context.edicion_page = EdicionPage(driver)
Exemplo n.º 6
0
def step_impl(context, text):
    base_page = BasePage(context.driver)
    base_page.see_element_with_text(text)
Exemplo n.º 7
0
def step_impl(context):
    extension_widget_page = BasePage(context.driver)
    extension_widget_page.verify_product(context.product)
def step_impl(context):
    account_name = BasePage(context.driver).get_account_name()
    assert account_name == "Tester Tester"
Exemplo n.º 9
0
 def __init__(self, browser):
     BasePage.__init__(self, browser)
Exemplo n.º 10
0
 def __init__(self, context):
     BasePage.__init__(self,
                       context.browser,
                       base_url='https://parent.land')