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")
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")