def test_13_butler_recommendation(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_butler_recommendation() sleep(5) self.assertIn('我要看房', uokoroomsearch.return_house_text())
def test_10_all_room(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_all_room() sleep(5) self.assertIn('/room/by0/', uokoroomsearch.return_url())
def test_4_rent_search(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_rents_search() renthrefs = ['http://www.pre.uoko.com/room/p1/','http://www.pre.uoko.com/room/p2/', 'http://www.pre.uoko.com/room/p3/','http://www.pre.uoko.com/room/p4/', 'http://www.pre.uoko.com/room/p5/'] self.assertIn(uokoroomsearch.return_url(), renthrefs)
def test_1_conditional_search(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() sleep(5) uokoroomsearch.input_search(u'大源') uokoroomsearch.click_search() sleep(5) self.assertIn('大源',uokoroomsearch.return_title())
def test_2_hotarea_search(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_hotarea_search() sleep(5) # self.assertIn('静君寺', uokoroomsearch.return_title()) try: assert u'静君寺' in uokoroomsearch.return_title() print('Test Pass.') except Exception as e: print('Test Fail.', format(e))
def test_11_first_house(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() h = uokoroomsearch.current_window() uokoroomsearch.click_room() uokoroomsearch.click_first_house() sleep(5) uokoroomsearch.into_new_window() # self.assertIn('保利心语2期', uokoroomsearch.return_title()) try: assert u'保利心语2期' in uokoroomsearch.return_title() print('Test Pass.') except Exception as e: print('Test Fail.', format(e)) uokoroomsearch.close() uokoroomsearch.switch_to_window(h)
def test_8_configure_search(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_configure_search()
def test_7_roommate_search(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_roommate_search()
def test_6_checkin_search(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_checkin_search()
def test_3_area_search(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_area_search() sleep(5)
def test_14_online_service(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_online_service() sleep(5)
def test_12_new_email(self): uokoroomsearch = roomsearchpage.RoomSearchPage(self.dr) uokoroomsearch.open_uoko_home() uokoroomsearch.click_room() uokoroomsearch.click_new_email() sleep(5)