Exemplo n.º 1
0
def login(mobile):


    USER_NAME = 'mapytesting2'
    PASSWORD = '******'

    main_screen = MainScreen(mobile)
    main_screen.menu_click()

    menu_screen = MenuScreen(mobile)
    menu_screen.log_in()

    login_screen = LogInScreen(mobile)
    login_screen.user_name(USER_NAME)
    login_screen.password(PASSWORD)
    login_screen.sign_in_button()
Exemplo n.º 2
0
def test_login(mobile):
    USER_NAME = 'mapytesting2'
    PASSWORD = '******'

    main_screen = MainScreen(mobile)
    main_screen.menu_click()

    menu_screen = MenuScreen(mobile)
    menu_screen.log_in()

    login_screen = LogInScreen(mobile)
    login_screen.user_name(USER_NAME)
    login_screen.password(PASSWORD)
    login_screen.sign_in_button()

    user_name = mobile.find_element_by_id(
        'cz.seznam.mapy:id/userName').get_attribute('text')
    password = mobile.find_element_by_id(
        'cz.seznam.mapy:id/accountName').get_attribute('text')

    assert user_name == 'mapytesting2'
    assert password == '*****@*****.**'