def test_e2e_OnlineBank(self): #Login Page loginPage = loginHomePage(self.driver) loginPage.getOnlineBankingLogin().click() loginPage.setUserName().send_keys("admin") loginPage.setPassword().send_keys("admin") loginPage.getSubmit().click() # Test scenario - Online Banking Home onlineBankingPage = onlineBankingHomePage(self.driver) onlineBankingPage.getAccountDetails() onlineBankingPage.verifyAccountInformationPageACNumber() onlineBankingPage.verifyCurrentDateWithBalanceDate() # Test scenario - Transfer Funds Page onlineTransferFund = onlineTransferFundPage(self.driver) onlineTransferFund.verifyTranfserFundLinkCorrectPageOpened() onlineTransferFund.verifyAccountToandFromTransferMoney() onlineTransferFund.verifyMessageCorrectwithAccountDetail() # Test scenario - Account Information page #1) Click on View Account Summary link in left hand navigation section onlineAccountInformation = onlineAccountInformationPage(self.driver) onlineAccountInformation.verifyAccountSummaryLinkNavigation() onlineAccountInformation.verifySameFromAccountClickGo() onlineAccountInformation.verifyDebtAmountAvailableInTable() onlineAccountInformation.verifyToAccountPresentinBalanceTable() onlineAccountInformation.verifyAmountPresentInCreditTable()
def test_top_four_tabs(self): loginPage = loginHomePage(self.driver) OnlineBankingLoginAvailable = loginPage.verifyTabOnlineBankingLogin( ).is_enabled() if OnlineBankingLoginAvailable == True: print("OnlineBankingLoginAvailable tab available and enabled") else: print("OnlineBankingLoginAvailable tab NOT available and enabled") tabPersonalAvailable = loginPage.verifyTabPersonal().is_enabled() if tabPersonalAvailable == True: print("Personal tab available and enabled") else: print("Personal tab NOT available and enabled") tabSmallBusinessAvailable = loginPage.verifyTabSmallBusiness( ).is_enabled() if tabSmallBusinessAvailable == True: print("Small Business tab available and enabled") else: print("Small Business tab NOT available and enabled") tabInsideAltro = loginPage.verifyTabInsideAltro().is_enabled() if tabInsideAltro == True: print("InsideAltro tab available and enabled") else: print("InsideAltro tab NOT available and enabled")
def test_logo_available(self): loginPage = loginHomePage(self.driver) logoAvailable = loginPage.getLogoImage().is_displayed() if logoAvailable == True: print("Logo is displayed") else: raise ("Logo is not displaying")
def test_login_success(self, getLoginSuccessData): loginPage = loginHomePage(self.driver) loginPage.getOnlineBankingLogin().click() print(getLoginSuccessData) #if getData == "{'UserName': '******', 'Password': '******'}": loginPage.setUserName().send_keys(getLoginSuccessData["UserName"]) loginPage.setPassword().send_keys(getLoginSuccessData["Password"]) #print("entered correct user name") #elif getData == "{'UserName': '******', 'Password': '******'}": #assert loginData.test_loginData == "Login Failed: We're sorry, but this username or password was not found in our system. Please try again." #print("entered Incorrect user name") loginPage.getSubmit().click() loginPage.getSignOff().click()
def test_login_failure(self, getLoginFailureData): loginPage = loginHomePage(self.driver) loginPage.getOnlineBankingLogin().click() print(getLoginFailureData) loginPage.setUserName().send_keys(getLoginFailureData["UserName"]) loginPage.setPassword().send_keys(getLoginFailureData["Password"]) loginPage.getSubmit().click() print(getLoginFailureData) msgLoginFailied = loginPage.getMsgLoginFailed().text print(msgLoginFailied) assert msgLoginFailied == "Login Failed: We're sorry, but this username or password was not found in our system. Please try again.", "Login Failed message successfully matched" # print("Login Failed message successfully matched") loginPage.getSignOff().click()