Пример #1
0
def loginSetup(request):
    hp = HomePage(request.cls.driver)
    hp.goTologinPage()
    sp = SignUpPage(request.cls.driver)
    sp.login("*****@*****.**", "MithunaAmazon@123")
    yield
    hp.logout()
    print("Logout Successful")
Пример #2
0
def loginLogout(request):
    hp = HomePage(request.cls.driver)
    lp = LoginPage(request.cls.driver)

    credentials = hp.fetchJSONData('loginCredential.json')
    username = credentials.get('username')
    password = credentials.get('password')

    hp.goToLogin()
    lp.loginAmazon(username, password)
    print("Successfully login")

    yield
    hp.logout()
    print("Successfully logout")