示例#1
0
 def setUpClass(cls):
     cls.driver = webdriver.Chrome()
     cls.driver.implicitly_wait(10)
     cls.driver.get(ClassesPage.admin_url)
     #cls.username ="******"
     #cls.password ="******"
     adminlogin.adminlogin(cls)
示例#2
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(),"*****@*****.**")
示例#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()
示例#4
0
	def test_uploadclass(self):
		self.driver.get(ClassesPage.admin_url)
		adminlogin.adminlogin(self)
		upload_class=ClassesPage.Uploadinfo(self.driver,ClassesPage.user_url,u"教务管理平台")
		upload_class.click_teaching()
		upload_class.click_classes()
		print (upload_class.p_classname())
		upload_class.click_class()
		time.sleep(1)
		print (upload_class.p_classname())
		upload_class.click_detail()
		#print (upload_class.p_classtext())
		upload_class.click_classinfo()
		time.sleep(1)
		upload_class.click_button()
		time.sleep(5)
示例#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()
示例#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()
示例#7
0
 def test_addclass(self):
     u'''新建班级'''
     self.driver.get(ClassesPage.admin_url)
     adminlogin.adminlogin(self)
     add_class = ClassesPage.AddClass(self.driver, ClassesPage.admin_url,
                                      u"教务管理平台")
     add_class.click_teaching()
     add_class.click_classes()
     add_class.click_addclass()
     add_class.input_classname(u"5班")
     add_class.click_classicon()
     add_class.click_getcourse()
     add_class.input_searchkey(" ")
     add_class.click_subsearch()
     add_class.click_course()
     add_class.click_subchoice()
     add_class.click_choiceteacher()
     add_class.input_searchkey(u"张懵")
     add_class.click_subsearch()
     add_class.click_teacher()
     add_class.click_subchoice()
     add_class.click_assistant()
     add_class.input_searchkey(u"张懵")
     add_class.click_subsearch()
     add_class.click_teacher()
     add_class.click_subchoice()
     add_class.input_learnstart()
     add_class.input_learnend()
     add_class.input_examtimestart()
     add_class.input_examtimeend()
     add_class.click_next()
     add_class.click_openqa()
     add_class.click_teacherid("10568")
     add_class.click_issethomework()  #可注释变为不布置作业
     add_class.click_ischeckofwork()
     add_class.click_homeworkteacher("10568")
     add_class.click_next()
     add_class.input_searchstudent(u"郭信林")
     add_class.click_student()
     add_class.click_choiceall()
     add_class.click_subchoicestudent()
     add_class.click_over()
     assert add_class.text_edit(), u"5班"
     add_class.click_classes()
示例#8
0
 def test_editcourse(self):
     u'''编辑课程'''
     self.driver.get(CoursePage.admin_url)
     adminlogin.adminlogin(self)
     edit_course = CoursePage.EditCourse(self.driver, user_url, u"教务管理平台")
     edit_course.click_teachding()
     edit_course.click_courses()
     edit_course.click_course()
     time.sleep(1)
     edit_course.input_period("14")
     time.sleep(1)
     edit_course.input_credit("1")
     time.sleep(1)
     edit_course.input_video("10")
     time.sleep(1)
     edit_course.input_task("10")
     time.sleep(1)
     edit_course.input_test("20")
     edit_course.input_exam("60")
     edit_course.click_over()
     assert edit_course.p_period(), "14"
     time.sleep(5)