def test_registrationAgeUnder18(self): driver = self.driver driver.get(self.base_url) url_1 = self.base_url + '/Account/Signup' url_2 = self.base_url + '/Account/ApplyNow' url_3 = self.base_url + '/Account/ApplyNow#' x = random.randint(10, 1000) text3 = 'Employment Information' text4 = 'Personal Information' text7 = 'We’re sorry.' text8 = 'We were unable to locate enough information to approve you for a spending limit at this time.' LoginPage.startRegistration(self) ##### Page 1: START ########### PORTAL = 'mainstreet' RegistrationPage1.fillForm1(self, email='*****@*****.**', username='******' + str(x), password="******", passwordConfirm="Ss123456", answer='valya') HelperTestBase.waitNextButton(self) ################## Page2 : Contact Information ######################### RegistrationPage2.fillForm2(self, firstName='sveta', lastName='step' + str(x), phone='6547899123', portal=PORTAL) ################## Page3: Employment Information ######################### RegistrationPage3.fillForm3(self, employerName='Private Firm Niagara', empPhone='5986547899', income='9999', ohterIncome='') ################## Page4: Personal Information ######################### RegistrationPage4.fillForm4_AgeLimitation(self, ssn='121512230', driverLic='555555555', state='PA') time.sleep(35) self.assertIn(text7, self.driver.page_source) self.assertIn(text8, self.driver.page_source) ### Check that Home button is present: RegistrationPage5.clickHomeButton(self) ### click on Home button => Home Page is opened, INFO banner, Header menu, Footer menu, Search field are presennt: self.assertIs(True, HomePage.checkINFOBannerPresent(self)) self.assertIs(True, HomePage.checkHeaderMenuPresent(self)) self.assertIs(True, HomePage.checkFooterMenuPresent(self)) self.assertIs(True, HomePage.checkSearchPresent(self))
def test_registration_GetSpendingLimitUnSuccess_InvalidDriverLicense(self): driver = self.driver driver.get(self.base_url) url_1 = self.base_url + '/Account/Signup' x = random.randint(100, 1000) text7 = 'We’re sorry.' text8 = 'We were unable to locate enough information to approve you for a spending limit at this time.' PORTAL = 'mainstreet' LoginPage.startRegistration(self) ##### Page 1: START ########### RegistrationPage1.fillForm1(self, email='', username='******' + str(x), password="******", passwordConfirm="Ss123456", answer='valya') time.sleep(5) ################## Page2 : Contact Information ######################### RegistrationPage2.fillForm2(self, firstName='sveta', lastName='step' + str(x), phone='3333333333', portal=PORTAL) ################## Page3: Employment Information ######################### RegistrationPage3.fillForm3(self, employerName='Private Firm Niagara', empPhone='5986547899', income='9855', ohterIncome='') ################## Page4: Personal Information ######################### RegistrationPage4.fillForm4(self, ssn='121512230', driverLic='111111111', state='PA') ######## Page5: Payment Information ################################### RegistrationPage5.fillForm5(self, accountType='DebitCard', cardNumber='5454-5454-5454-5454', cvv="1234", month='10', year='2020') time.sleep(35) self.assertIn(text7, self.driver.page_source) self.assertIn(text8, self.driver.page_source)