def test_Addnewcustomer_TC003(self): driver = self.driver driver.get(globalvar.baseURL) log = login(driver) log.enter_userid(globalvar.un) log.enter_password(globalvar.pwd) log.Login_btn() newcust = Newcustomer(driver) newcust.Newcustomerlink() newcust.Add_new_customer_name() newcust.Add_new_customer_Gender() newcust.Add_new_customer_dob(globalvar.dob) newcust.Add_new_customer_address(globalvar.ad) newcust.Add_new_customer_city(globalvar.cty) newcust.Add_new_customer_state(globalvar.st) newcust.Add_new_customer_pin(globalvar.pin) newcust.Add_new_customer_mobnum(globalvar.mb) newcust.Add_new_customer_password(globalvar.pw) newcust.Add_new_customer_email(globalvar.domain) time.sleep(10) newcust.Submitbtn() pagetitle2 = driver.title if pagetitle2 == "Guru99 Bank Customer Registration Page": assert True else: assert False time.sleep(5) newcust.WriteCustid_toexcel() time.sleep(10)
def test_products_addtocartTC002(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.enterusername(sheet1.cell(5, 1).value) log.enterpassword(sheet1.cell(5, 2).value) log.Login() # User able to select products and proceed to cart items prod = Products(driver) prod.Backpack_Addtocart() prod.Tshirts_Addtocart() prod.Click_Add_to_cart() time.sleep(5) cart = Cart(driver) # User Continue to Shop cart.Continueshopping_ID() # New Item Added in Cart prod.Onsie_Addtocart() # User fill checkout page details like Fn, Ln etc, Continue with order and Finish prod.Click_Add_to_cart() cart.Checkout() pagetitle1 = driver.title if pagetitle1 == "Swag Labs": assert True else: assert False time.sleep(5) cart.Checkout_Successtext_verify()
def test_loginvalid_TC001(self): driver = self.driver driver.get(globalvar.baseURL) log = login(driver) log.enter_userid(globalvar.un) log.enter_password(globalvar.pwd) log.Login_btn()
def test_EditCust_TC004(self): driver = self.driver driver.get(globalvar.baseURL) log = login(driver) log.enter_userid(globalvar.un) log.enter_password(globalvar.pwd) log.Login_btn() edcust = Editcustomer(driver) time.sleep(5) edcust.Click_Custlink() edcust.Enter_custid() edcust.Submit()
def test_loginvalid_TC001(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.enterusername(un) log.enterpassword(pwd) log.Login() time.sleep(10) pagetitle = driver.title if pagetitle == "Swag Labs": assert True else: assert False
def test_menulinkLogout_TC004(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.enterusername(sheet1.cell(2, 1).value) log.enterpassword(sheet1.cell(2, 2).value) log.Login() lg = Logout(driver) lg.Click_Access_4items() lg.Click_logout() pagetitle2 = driver.title if pagetitle2 == "Swag Labs": assert True else: assert False
def test_managerpage_TC002(self): driver = self.driver driver.get(globalvar.baseURL) log = login(driver) log.enter_userid(globalvar.un) log.enter_password(globalvar.pwd) log.Login_btn() mgr = Manager(driver) mgr.Landingpage_header_verify() pagetitle = driver.title if pagetitle == "Guru99 Bank Manager HomePage": assert True else: assert False time.sleep(5)
def test_logout_TC004(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.Firstpagelinks() log.enter_username(Globalvar.Username) log.enter_password(Globalvar.Password) log.Login() lg = Logout(driver) lg.Logoutpage() pagetitle2 = driver.title if pagetitle2 == "CURA Healthcare Service": assert True else: assert False
def test_history_TC003(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.Firstpagelinks() log.enter_username(Globalvar.Username) log.enter_password(Globalvar.Password) log.Login() his = History(driver) his.Historypage() if driver.page_source.__contains__("No appointment."): assert True else: assert False his.Click_Homepage()
def test_loginvalid_TC001(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.Firstpagelinks() log.enter_username(Globalvar.Username) log.enter_password(Globalvar.Password) log.Login() time.sleep(5) Pagetitle = self.driver.title if Pagetitle == "CURA Healthcare Service": assert True else: # allure.attach(self.driver.get_screenshot_as_png(),name="testLoginscreen") assert False
def test_profile_TC005(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.Firstpagelinks() log.enter_username(Globalvar.Username) log.enter_password(Globalvar.Password) log.Login() pf = Profile(driver) pf.Profilepage() if driver.page_source.__contains__("Under construction."): assert True else: assert False pf.Logout_p() time.sleep(5)
def test_menulinkAbout_TC003(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.enterusername(sheet1.cell(5, 1).value) log.enterpassword(sheet1.cell(5, 2).value) log.Login() ab = About(driver) ab.Click_Access_4items() ab.Click_About() pagetitle2 = driver.title if pagetitle2 == "Cross Browser Testing, Selenium Testing, Mobile Testing | Sauce Labs": assert True else: assert False ab.Click_try_it_free() ab.enter_workemail(Globalvar.wemail) ab.enter_username(Globalvar.uname) ab.enter_password(Globalvar.pwd) ab.submit()
def test_appointment_TC002(self): driver = self.driver driver.get(Globalvar.baseURL) log = login(driver) log.Firstpagelinks() log.enter_username(Globalvar.Username) log.enter_password(Globalvar.Password) log.Login() time.sleep(10) app = Appointment(driver) app.Select_facility1_option() app.Select_checkbox_readmission() app.Select_healthcareprogram() app.Enter_visitdate(Globalvar.date) app.Enter_Comments(Globalvar.Comment) time.sleep(10) app.Bookappointment() pagetitle = driver.title if pagetitle == "CURA Healthcare Service": assert True else: assert False