Beispiel #1
0
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)
Beispiel #2
0
def switch_language_and_submit(context, language):
    page = LoginPage(context.driver)
    page.switch_language_and_submit(language)
Beispiel #3
0
def input_valid_credentials_to_login_form(context):
    page = LoginPage(context.driver)
    page.input_valid_credentials_to_login_form()
Beispiel #4
0
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)
Beispiel #5
0
def change_language(context, language):
    page = LoginPage(context.driver)
    page.change_language(language)
Beispiel #6
0
def login_to_pah(context):
    page = LoginPage(context.driver)
    page.login_to_pah_website()
Beispiel #7
0
def login_view_translation(context, translation):
    page = LoginPage(context.driver)
Beispiel #8
0
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
Beispiel #9
0
def login_unsuccessful(context):
    page = LoginPage(context.driver)
    page.disabled_login_button()
    assert "login" in page.get_current_url()
Beispiel #10
0
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
Beispiel #11
0
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)
Beispiel #16
0
def open_main_url(context):
    page = LoginPage(context.driver)
    page.visit()
    assert "login" in page.get_current_url()
Beispiel #17
0
def input_login_data(context, login_credential, password_credential):
    page = LoginPage(context.driver)
    page.input_login_data(login_credential, password_credential)
Beispiel #18
0
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()