コード例 #1
0
 def test_PeAccountPwd4(self):
     """ 账号密码页面,回到顶部 """
     self.pap().front()
     method.Method(self.driver).js_bottom()
     method.Method(self.driver).back_top()
     # 校验是否找到个人中心是否存在
     self.assertEqual(method.Method(self.driver).personal(), True)
     Function.insert_img(self.driver, "PeAccountPwd_回到顶部.jpg")
コード例 #2
0
 def test_PeAccountPwd3(self):
     """ 账号密码页面,回到首页 """
     self.pap().front()
     method.Method(self.driver).js_bottom()
     method.Method(self.driver).back_homepage()
     # 校验页面数据中是否出现“告警信息”文字
     self.assertEqual(method.Method(self.driver).home_text(), "告警信息")
     Function.insert_img(self.driver, "PeAccountPwd_回到首页.jpg")
コード例 #3
0
 def test_business8(self):
     """ 页面回到首页 """
     self.bu().front()
     method.Method(self.driver).js_bottom()
     method.Method(self.driver).back_homepage()
     self.waiting_time()
     Function.insert_img(self.driver, "Business_回到首页.jpg")
     # 校验页面数据中是否出现“告警信息”文字
     self.assertEqual(homePage.Home(self.driver).home_alarm_text(), "告警信息")
コード例 #4
0
 def test_business9(self):
     """ 页面回到顶部 """
     self.bu().front()
     method.Method(self.driver).js_bottom()
     method.Method(self.driver).back_top()
     self.waiting_time()
     Function.insert_img(self.driver, "Business_回到顶部.jpg")
     # 校验是否找到个人中心是否存在
     self.assertEqual(method.Method(self.driver).personal(), True)
コード例 #5
0
 def test_business72(self):
     """ 点击第二页页码跳转 """
     self.bu().front()
     method.Method(self.driver).js_bottom()
     self.bu().business_page_number2()
     method.Method(self.driver).js_bottom()
     text = self.bu().business_page_previouspage_text()
     self.waiting_time()
     Function.insert_img(self.driver, "Business_点击第二页页码跳转校验.jpg")
     # 校验是否出现上一页页码
     self.assertEqual(text, "上一页")
コード例 #6
0
 def bu_mood_equally(self):
     text1 = self.business_page_moodall_text(13)
     text2 = self.business_page_moodall_text(14)
     while text1 != text2:
         method.Method(self.driver).js_bottom()
         self.business_page_nextpage()
         text1 = self.business_page_moodall_text(13)
         text2 = self.business_page_moodall_text(14)
         if text1 == text2:
             break
     method.Method(self.driver).js_bottom()
     self.business_message_select(13)
     self.business_message_select(14)
     self.business_pagefoot_update()
コード例 #7
0
 def na_navigation_add_newnavigation_operation(self, name):
     """判断新增测试导航是否存在,然后进行删除、新增操作"""
     self.na_navigation_add()
     list1 = []
     number1 = self.navigation_add_len()
     for i in range(number1):
         text = self.navigation_add_len_text(i)
         list1.append(text)
     if name not in list1:
         self.navigation_add_name(name)
         self.navigation_add_js()
         self.navigation_add_label_click(1)
         self.navigation_add_button()
         self.navigation_add_button_button()
         method.Method(self.driver).back_top()
         # number2 = self.navigation_add_len()
         # for i in range(number2):
         #     text = self.navigation_add_len_text(i)
         #     list1.append(text)
         # index = list1.index(name)
         self.navigation_add_len_click(-1)
         self.navigation_add_navigation_del()
     else:
         index = list1.index(name)
         self.navigation_add_len_click(index)
         self.navigation_add_navigation_del()
コード例 #8
0
 def bu_mood_differ(self):
     mood = []
     num = self.business_page_moodall_number()
     for i in range(num):
         text = self.business_page_moodall_text(i)
         mood.append(text)
     while len(list(set(mood))) == 1:
         method.Method(self.driver).js_bottom()
         self.business_page_nextpage()
         mood = []
         num = self.business_page_moodall_number()
         for i in range(num):
             text = self.business_page_moodall_text(i)
             mood.append(text)
         if len(list(set(mood))) > 1:
             break
     method.Method(self.driver).js_bottom()
     self.business_pagefoot_all()
     self.business_pagefoot_update()
コード例 #9
0
 def test_business71(self):
     """ 顶部与底部的页码总条数是否一致 """
     self.bu().front()
     num1 = self.bu().business_totalnumber_up_text()
     method.Method(self.driver).js_bottom()
     num2 = self.bu().business_totalnumber_down_text()
     self.waiting_time()
     Function.insert_img(self.driver, "Business_顶部与底部的页码总条数一致校验.jpg")
     # 校验页面顶部与底部的页码总条数是否一致
     self.assertEqual(num1, num2)
コード例 #10
0
 def test_business512(self):
     """  输入小于10位的数字、字母、中文组合,选择任意标签,点击添加按钮 """
     self.bu().bu_time_messagereport()
     self.bu().business_message_report_input(text="测试新建报告")
     self.bu().business_message_report_addbtn()
     navigationPage.Navigation(self.driver).na_check('报告厅')
     method.Method(self.driver).js_bottom()
     text = auditoriumPage.Auditorium(self.driver).briefing_title()
     self.waiting_time()
     Function.insert_img(self.driver, "Business_新建简报成功.jpg")
     # 校验在报告厅中是否新建的报告
     self.assertEqual(text, "测试新建报告")
コード例 #11
0
 def test_business63(self):
     """ 第一页全部数据导出 """
     Function.del_file()
     self.bu().business_time_select_time(2)
     text_page = self.bu().business_message_title_text()
     method.Method(self.driver).js_bottom()
     self.bu().business_pagefoot_all()
     self.bu().business_pagefoot_export()
     text_down = Function.read_excel(0, 3)
     self.waiting_time()
     Function.insert_img(self.driver, "Business_第一页全部数据导出校验.jpg")
     # 校验下载文件的标题和网页显示的标题是否一致
     self.assertEqual(text_page, text_down)
     Function.del_file()
コード例 #12
0
 def test_business64(self):
     """ 第一页全部数据收藏 """
     loginPage.Login(self.driver).user_login_front()
     navigationPage.Navigation(self.driver).na_personal_check('收藏关注')
     positive = pca.Pca(self.driver).collection_number_all()
     number = Function.re_sub(positive)
     self.bu().business_time_select_time(2)
     method.Method(self.driver).js_bottom()
     self.bu().business_pagefoot_all()
     self.bu().business_pagefoot_collect()
     navigationPage.Navigation(self.driver).na_personal_check('收藏关注')
     positive = pca.Pca(self.driver).collection_number_all()
     number_new = Function.re_sub(positive)
     self.waiting_time()
     Function.insert_img(self.driver, "Business_第一页全部数据收藏校验.jpg")
     # 校验原收藏数量加上收藏数量是否收藏后总量
     self.assertEqual(number_new, number + 15)