Beispiel #1
0
def step_impl(context):
    context.execute_steps(u'''
        Given The user is logged in the application
        When The user clicks the 'Offerings' on the top menu
    ''')
    WebDriverWait(context.driver, 10).until(
        expected_conditions.frame_to_be_available_and_switch_to_it(
            BasePage.main_iframe(context)))
    title = BasePage.iframe_title(context)
    assert title.get_attribute('text') == 'Sales and Offering Space', \
        "Page title is '%s' instead of 'Sales and Offering Space'" % (title.get_attribute('text'))
    context.driver.switch_to.default_content()
Beispiel #2
0
def step_impl(context):
    context.driver.switch_to_frame(BasePage.main_iframe(context))

    AccountTransferPageFields.credit_acc_list(context).click()
    AccountTransferPageFields.credit_acc(context).click()

    # upit u bazu samo jednom za sva polja
    amount_reason_date_dict = DataParser.input_data_fields(context)

    amount = amount_reason_date_dict['AMOUNT']
    AccountTransferPageFields.amount(context).send_keys(str(amount))

    reason_for_payment = amount_reason_date_dict['REASON_FOR_PAYMENT']
    AccountTransferPageFields.reason_for_payment(context).send_keys(
        reason_for_payment)

    yyyy, mm, dd = amount_reason_date_dict['EXECUTION_DATE'].split('-')
    execution_date = dd + '.' + mm + '.' + yyyy
    AccountTransferPageFields.execution_date(context).clear()
    AccountTransferPageFields.execution_date(context).send_keys(execution_date)

    # save input data dict to context in order to use it in the next steps
    context.new_payment_data = amount_reason_date_dict

    context.driver.switch_to.default_content()
Beispiel #3
0
def step_impl(context):
    context.driver.switch_to_frame(BasePage.main_iframe(context))
    WebDriverWait(context.driver, 10).until(
        expected_conditions.visibility_of(
            AccountTransferPageFields.error_container(context)))
    error_message = AccountTransferPageFields.error_message(
        context).get_attribute('textContent')
    assert error_message == 'The entries are incomplete or incorrect:', "Actual message is '%s'" % error_message
    context.driver.switch_to.default_content()
Beispiel #4
0
def step_impl(context):
    context.execute_steps(u'''
        Given The user is logged in the application
        When The user hovers over 'Payments' in the top menu
        When The user clicks the 'Account transfer' on the Payments menu
    ''')
    WebDriverWait(context.driver, 10).until(
        expected_conditions.frame_to_be_available_and_switch_to_it(
            BasePage.main_iframe(context)))
    AccountTransferPage.payment_form_input(context)
    context.driver.switch_to.default_content()
Beispiel #5
0
def step_impl(context):
    WebDriverWait(context.driver, 10).until(
        expected_conditions.frame_to_be_available_and_switch_to_it(
            BasePage.main_iframe(context)))
    order_status = AccountTransferPageFields.payment_status(
        context).get_attribute('textContent')
    assert order_status == 'Fully approved', "Actual status is '%s'" % order_status
    context.driver.switch_to.default_content()

    # check the database only if payment was successful
    orders_count_before = len(GetDataFromDb.get_all_payments(context))
    context.orders_count_before = orders_count_before
def step_impl(context):
    # the application page is loaded
    WebDriverWait(context.driver, 10).until(
        expected_conditions.visibility_of(LoginPage.ebanking_title(context)))
    LoginPage.demo_app_link(context).click()
    # close the welcome message
    WebDriverWait(context.driver, 10).until(
        expected_conditions.presence_of_element_located(
            CommonLocators.WELCOME_MSG)).click()
    # check username
    username = BasePage.user_menu(context)
    HighlightElements.highlight(context, username)
    assert username.text == 'DG', "Username is incorrect"
def step_impl(context):
    base_page = BasePage(context.driver)
    assert base_page.cart is None or not base_page.cart.is_displayed()
def step_impl(context):
    username = BasePage.user_menu(context)
    HighlightElements.highlight(context, username)
    assert username.text == 'UBS Demo', "Username is incorrect"
def step_impl(context):
    acc_trsf_menu = BasePage.acc_transfer(context)
    HighlightElements.highlight(context, acc_trsf_menu)
    acc_trsf_menu.click()
def step_impl(context):
    payments_top_menu = BasePage.top_nav_payments(context)
    HighlightElements.highlight(context, payments_top_menu)
    ActionChains(context.driver).move_to_element(payments_top_menu).perform()
    WebDriverWait(context.driver, 10).until(
        expected_conditions.visibility_of(BasePage.payments_menu(context)))
def step_impl(context):
    offerings_top_menu = BasePage.top_nav_offerings(context)
    HighlightElements.highlight(context, offerings_top_menu)
    offerings_top_menu.click()
def step_impl(context):
    payments_top_menu = BasePage.top_nav_payments(context)
    HighlightElements.highlight(context, payments_top_menu)
    payments_top_menu.click()
    WebDriverWait(context.driver, 5).until((expected_conditions.visibility_of(
        BasePage.payments_dropdown(context))))
Beispiel #13
0
def step_impl(context):
    WebDriverWait(context.driver, 10).until(
        expected_conditions.frame_to_be_available_and_switch_to_it(
            BasePage.main_iframe(context)))
    AccountTransferPage.payment_form_confirm(context)
    context.driver.switch_to.default_content()
Beispiel #14
0
def step_impl(context):
    context.driver.switch_to_frame(BasePage.main_iframe(context))
    AccountTransferPageFields.submit(context).click()
    context.driver.switch_to.default_content()