def before_all(context): context.driver = webdriver.Chrome( executable_path='/usr/local/bin/chromedriver') context.logout_page = LogoutPage(context.driver) context.login_page = LoginPage(context.driver) context.add_new_drive_page = AddNewDrivePage(context.driver) context.confirm_drive_page = ConfirmDrivePage(context.driver) context.driver.implicitly_wait(6)
def switch_language_and_submit(context, language): page = LoginPage(context.driver) page.switch_language_and_submit(language)
def input_valid_credentials_to_login_form(context): page = LoginPage(context.driver) page.input_valid_credentials_to_login_form()
def translation_login_view(context, login_title, username, password, login_button): page = LoginPage(context.driver) page.translation_login_view(login_title, username, password, login_button)
def change_language(context, language): page = LoginPage(context.driver) page.change_language(language)
def login_to_pah(context): page = LoginPage(context.driver) page.login_to_pah_website()
def login_view_translation(context, translation): page = LoginPage(context.driver)
def login_successful(context): page = LoginPage(context.driver) page.login_to_pah_website() page.login_successful() assert context.driver.execute_script( "return window.localStorage.jwt") is not None
def login_unsuccessful(context): page = LoginPage(context.driver) page.disabled_login_button() assert "login" in page.get_current_url()
def login_successful(context): page = LoginPage(context.driver) page.login_successful() page.wait_for_url("drive") assert context.driver.execute_script("return window.localStorage.jwt") is not None
def submit_form_with_valid_credentials(context, login_credential, password_credential): page = LoginPage(context.driver) page.submit_login_form(login_credential, password_credential)
def main_page(context): page = LoginPage(context.driver) page.navigate_to_sign_in()
def login_to_website(context): page = LoginPage(context.driver) page.logged_in_user()
def form_error(context, error): page = LoginPage(context.driver) page.login_form_error(error)
def submit_login_form(context, login, password): page = LoginPage(context.driver) page.submit_login_form(login, password)
def open_main_url(context): page = LoginPage(context.driver) page.visit() assert "login" in page.get_current_url()
def input_login_data(context, login_credential, password_credential): page = LoginPage(context.driver) page.input_login_data(login_credential, password_credential)
def login_via_logout_view(context): page_logout = LogoutPage(context.driver) page_logout.navigate_to_login_via_logout() page_login = LoginPage(context.driver) page_login.login_to_pah_website() page_login.login_successful()