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)
def test_auditorium1(self): """ 获取简报名称 """ navigationPage.Navigation(self.driver).na_check('报告厅') sleep(2) auditoriumPage.Auditorium(self.driver).navigation_add_js() text = auditoriumPage.Auditorium(self.driver).briefing_title() print("名称是:" + text) # 校验在报告厅中是否新建的报告 self.assertEqual(text, "测试新建报告")
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, "测试新建报告")
def test_business542(self): """ 单条数据收藏,查看收藏关注中是否有此条信息 """ self.bu().front() self.bu().business_time_select_time(2) text1 = self.bu().business_message_title_text() chains = self.bu().business_message_mood_chains() ActionChains(self.driver).move_to_element(chains).perform() collect_text = self.bu().business_message_collect_text() if collect_text == "取消收藏": self.bu().business_message_collect() self.bu().business_message_collect() navigationPage.Navigation(self.driver).na_personal_check('收藏关注') text2 = pca.Pca(self.driver).collection_title_text() self.waiting_time() Function.insert_img(self.driver, "Business_单条数据收藏后查看收藏关注中是否有此条信息.jpg") # 校验是否找到首条信息的情绪倾向为中 self.assertEqual(text1, text2)
def front(self): loginPage.Login(self.driver).user_login_front() navigationPage.Navigation(self.driver).na_check("专题分析")
def test_PeAccountPwd21(self): """ 真实姓名输入为空,其他项不做修改,点击保存 """ navigationPage.Navigation(self.driver).na_personal_check("账号密码") self.pap().account_button() text = self.pap().account_success_text() print("文本是:【" + text + "】")
def front(self): loginPage.Login(self.driver).user_login_front() navigationPage.Navigation(self.driver).na_personal_check("账号密码")
def na(self): return navigationPage.Navigation(self.driver)