Beispiel #1
0
	def test_search(self):
		u'''搜索用户'''
		self.driver.get(UserPage.user_login)
		adminlogin.adminlogin(self)
		search_user=UserPage.SearchUser(self.driver,admin_url,u"教务管理平台")
		search_user.click_usermanager()
		search_user.click_users()
		print(search_user.userinfo_p())
		search_user.input_search("8",u"数学系")
		search_user.click_search()
		self.assertNotEqual(search_user.userinfo_p(),"*****@*****.**")
Beispiel #2
0
 def test_userzdelete(self):
     deluser_option = UserPage.Deleteuser(self.driver, user_url, u"教务管理平台")
     print(deluser_option.userinfo_p())
     deluser_option.input_sykey(u"真")
     try:
         deluser_option.click_search()
         print(deluser_option.userinfo_p())
         #deluser_option.click_user()
         #deluser_option.click_del()
     except:
         pass
Beispiel #3
0
 def test_adduser(self):
     u'''批量导入用户'''
     self.driver.get(UserPage.user_login)
     adminlogin.adminlogin(self)
     add_users = UserPage.AddUsers(self.driver, UserPage.admin_url,
                                   u"教务管理平台")
     add_users.click_usermanager()
     add_users.click_users()
     add_users.click_addusers()
     add_users.input_file("E:\\test\\jqwk_pom\\report\\a.xlsx")
     add_users.click_btn()
Beispiel #4
0
    def test_userupdate(self):
        u'''更改用户组'''

        update_option = UserPage.Updateup(self.driver, user_url, u"教务管理平台")
        print(update_option.userinfo_p())
        update_option.input_sykey(u"王")
        update_option.click_search()
        print(update_option.userinfo_p())
        update_option.click_user()
        update_option.click_type("8")
        update_option.click_submit()
        time.sleep(2)
        update_option.click_comfirm()
        self.assertEqual(update_option.group_p(), u"中新")
Beispiel #5
0
 def test_usereditor(self):
     u"编辑用户"
     self.driver.get(UserPage.user_login)
     adminlogin.adminlogin(self)
     user_option = UserPage.UpdateUser(self.driver, admin_url, u"教务管理平台")
     user_option.click_usermanager()
     user_option.click_users()
     print(user_option.userinfo_p())
     user_option.input_sykey(u"周")
     user_option.click_search()
     print(user_option.userinfo_p())
     user_option.click_user()
     user_option.update_name("zhoujin")
     user_option.update_isteacher("0")
     user_option.click_submit()
     #self.assertEqual(user_option.userinfo_p(),"*****@*****.**")
     user_option.click_active()
Beispiel #6
0
 def test_adduser(self):
     u'''添加用户'''
     self.driver.get(UserPage.user_login)
     adminlogin.adminlogin(self)
     add_user = UserPage.AddUser(self.driver, UserPage.admin_url, u"教务管理平台")
     add_user.click_usermanager()
     add_user.click_users()
     add_user.click_adduserbtn()
     add_user.input_username("showwind")
     add_user.select_groupid("8")
     add_user.select_isteacher("0")
     add_user.input_psw("111111")
     add_user.input_nickname(u"周三")
     add_user.input_realname(u"周三")
     add_user.input_email("*****@*****.**")
     add_user.input_stuid("9214567")
     add_user.click_btn()
Beispiel #7
0
	def test_srenlist(self):
		u'''分页跳转'''
		render_list=UserPage.RdList(self.driver,admin_url,u"教务管理平台")
		render_list.input_search("0",)
		render_list.click_search()
		render_list.click_renderlist(2)