import datetime import os import pytest import pytest_bdd import pytest_html from logger import logger from pytest_bdd import ( given, scenario, then, when, ) import page_objects.register_page as page from utilities.base_class import BaseClass as base feature_file_path = base.feature_file_path('registration.feature') register = page.RegistrationPage() @scenario(feature_file_path, 'New user registration') def test_registering_a_new_user(): """Registering a new user.""" @given('Navigate to Registration page') def navigate_to_registration_page(): global driver driver = base.launch_browser() logger.info("browser launched and navigate to Para Bank home page") register.clk_register_btn(driver) logger.info("Clicked on Register button")
import time import os import pytest import pytest_bdd import pytest_html from pytest_bdd import ( given, scenario, then, when, ) import page_objects.bill_pay_page as _page from utilities.base_class import BaseClass as base import page_objects.open_new_account_page as acnt_page feature_file_path = base.feature_file_path('bill_pay.feature') page = _page.BillPayPage() account_page = acnt_page.OpenNewAccountPage() @scenario(feature_file_path, 'Bill Payment') def test_bill_payment(): """Bill Payment.""" @given( 'Login with valid user credetials and navigate to Bill Payment service page' ) def login_with_valid_user_credetials_and_navigate_to_bill_payment_service_page( ): global driver
from logger import logger from pytest_bdd import ( given, scenario, then, when, ) import os import pytest import pytest_bdd import pytest_html import page_objects.verify_customercare_page as _page from utilities.base_class import BaseClass as base import page_objects.open_new_account_page as acnt_page feature_file_path = base.feature_file_path( 'verify_customercare_services.feature') page = _page.CustomerCareServices() account_page = acnt_page.OpenNewAccountPage() @scenario(feature_file_path, 'Customer Care Services') def test_customer_care_services(): """Customer Care Services.""" @given( 'Login with valid credentials and navigate to customer care services page') def login_with_valid_credentials_and_navigate_to_customer_care_services_page(): global driver driver = base.launch_browser() logger.info("browser launched and navigate to Para Bank home page")
import pytest_bdd import pytest_html import config from logger import logger from pytest_bdd import ( given, scenario, then, when, ) from utilities.base_class import BaseClass as base from page_objects.open_new_account_page import OpenNewAccountPage feature_file_path = base.feature_file_path('open_new_account.feature') account_page = OpenNewAccountPage() @scenario(feature_file_path, 'Opening a new account') def test_opening_a_new_account(): """Opening a new account.""" @given('Login with valid user credetials and navigate to Open New Account page') def login_with_valid_user_credetials_and_navigate_to_open_new_account_page(): global driver driver = base.launch_browser() logger.info("browser launched and navigate to Para Bank home page") account_page.fill_username_fld(driver) logger.info("Filled username field")
from pytest_bdd import ( given, scenario, then, when, ) import page_objects.fund_transfer_page as funds import page_objects.open_new_account_page as acnt_page from utilities.base_class import BaseClass as base import os import pytest import pytest_bdd import pytest_html feature_file_path = base.feature_file_path('transfer_funds.feature') page = funds.FundTransferPage() accounts_page = acnt_page.OpenNewAccountPage() @scenario(feature_file_path, 'Account Overview') def test_account_overview(): """Account Overview.""" @given('Login with valid user credetials') def login_with_valid_user_credetials(): global driver driver = base.launch_browser() logger.info("browser launched and navigate to Para Bank home page") accounts_page.fill_username_fld(driver)