Exemple #1
0
def signed_in_respondent(context):
    sign_in_respondent.go_to()
    # Only attempt to sign in if not already signed in otherwise implicitly redirected to homepage
    if '/sign-in' in browser.url:
        browser.driver.find_element_by_id('username').send_keys(
            context.respondent_email)
        browser.driver.find_element_by_id('inputPassword').send_keys(
            Config.RESPONDENT_PASSWORD)
        browser.find_by_id('sign_in_button').click()
Exemple #2
0
def enter_credentials(username, password):
    sign_in_respondent.go_to()
    browser.driver.find_element_by_id('username').send_keys(username)
    browser.driver.find_element_by_id('inputPassword').send_keys(password)
Exemple #3
0
def respondent_logs_into_account(context):
    sign_in_respondent.go_to()
    browser.driver.find_element_by_id('username').send_keys(context.respondent_email)
    browser.driver.find_element_by_id('inputPassword').send_keys('Password1!')
    browser.find_by_id('sign_in_button').click()
Exemple #4
0
def navigate_to_sign_in_page(_):
    sign_in_respondent.go_to()
Exemple #5
0
def respondent_enters_wrong_password(username):
    sign_in_respondent.go_to()
    browser.driver.find_element_by_id('username').send_keys(username)
    browser.driver.find_element_by_id('inputPassword').send_keys(
        'wrong-password')
    browser.find_by_id('sign_in_button').click()