def test_logout(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(2) logout = homepage(driver) logout.click_logout() time.sleep(2) print("test_logout success")
def test_search_field(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(1) apt = homepage(driver) apt.click_appointment() time.sleep(1) apt.search_field() time.sleep(2) print("test_search_field success")
def test_login(self): driver = self.driver Search = homepage(driver) driver.get(util.url) Search.Select_location(util.location) Search.Click_On_Submit_button() Search.Retrive_No_Of_Rows() Search.Listout() Search.Sorting_List() Search.Selecting_Property() Search.Property_Name_Retrive() Search.Click_On_Seller() Search.Check_The_Product()
def test_appointment(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(1) apt = homepage(driver) apt.click_appointment() time.sleep(1) apt.app_appointment_assert() #asserting the Appointment apt.app_visitor_assert() #asserting the Appointment > Visitor apt.new_appointment() time.sleep(1) print("test_appointment success")
def test_visitor_phone(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(1) apt = homepage(driver) apt.click_appointment() time.sleep(1) apt.new_appointment() time.sleep(1) apt.get_visitor_phone() time.sleep(1) print("test_visitor_phone success")
def test_login(self, email,password): driver = self.driver driver.get(utils.url) login = loginpage(driver) login.enter_email(email) login.enter_password(password) login.click_login() time.sleep(2) home = homepage(driver) home.click_name() time.sleep(2) home.logout_link() time.sleep(2)
def test_cancel_button(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(1) apt = homepage(driver) apt.click_appointment() time.sleep(1) apt.new_appointment() time.sleep(1) apt.get_visitor_name() time.sleep(1) apt.cancel_button() time.sleep(1) print("test_cancel_button success")
def test_save_button(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(1) apt = homepage(driver) apt.click_appointment() time.sleep(1) apt.new_appointment() time.sleep(1) apt.save_button() time.sleep(2) apt.blank_date_assert() apt.character_only_assert() apt.mobilno_error_assert() print("test_save_button success")
def test_date_picker(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(1) apt = homepage(driver) apt.click_appointment() time.sleep(1) apt.new_appointment() time.sleep(1) sb_dt = apt.select_date() driver.execute_script("arguments[0].removeAttribute('readonly')", sb_dt) sb_dt.send_keys(apt.get_date()) time.sleep(1) print("test_date_picker success")
def test_location_dropdown(self): driver = self.driver login = loginpage(driver) login.login() time.sleep(1) apt = homepage(driver) apt.click_appointment() time.sleep(1) apt.new_appointment() time.sleep(1) loc = apt.location() drp = Select(loc) drp.select_by_value(value="1009") time.sleep(1) driver.save_screenshot( 'C:\selenium_scripts\screenshots\screenshot.png') print("test_location_dropdwon success")