def test_1_search_by_name(self): driver = self.driver loginpage = LoginPage(driver) loginpage.login('admin', 'admin') mainpage = MainPage(driver) mainpage.click_menu_res_type() restype = ResType(driver) num = restype.query_by_name('羽毛球') self.assertEqual(num, '1')
def test_modify_restype(self): driver = self.driver loginpage = LoginPage(driver) loginpage.login('admin', 'admin') mainpage = MainPage(driver) mainpage.click_menu_res_type() restype = ResType(driver) restype.click_modify_btn() modify_restype = ResTypeModify(driver) modify_restype.modify_res_type('足球','足球2')
def test_add_restype(self): driver = self.driver loginpage = LoginPage(driver) loginpage.login('admin', 'admin') mainpage = MainPage(driver) mainpage.click_menu_res_type() restype = ResType(driver) restype.click_add_btn() add_restype = ResTypeAdd(driver) add_restype.add_res_type('篮球')
def test_add_config_restype(self): driver = self.driver loginpage = LoginPage(driver) loginpage.login('admin', 'admin') mainpage = MainPage(driver) mainpage.click_menu_res_type() restype = ResType(driver) restype.click_plus_btn() restype.sleep(1) config_restype = ResTypeConfig(driver) config_restype.add_config('Wifi', '无线网络') message = config_restype.get_opt_message() self.assertEqual(message, '操作成功!') config_restype.sleep(3)