Exemplo n.º 1
0
 def test_navigation25(self):
     """ 点击个人中心我的套餐 """
     self.na().na_personal()
     self.na().na_personal_check("我的套餐")
     Function.insert_img(self.driver, "Navigation_切换到我的套餐.jpg")
     # 校验页面数据中是否出现“当前套餐内容”文字
     self.assertEqual(self.na().navigation_personal_mymeal_text(), "当前套餐内容")
Exemplo n.º 2
0
 def test_login6(self):
     """ 用户名输入大于20位,密码有内容 """
     self.user_login_verify(username="******",
                            password="******")
     po = loginPage.Login(self.driver)
     Function.insert_img(self.driver, "Login_用户名输入大于20位密码有内容.jpg")
     self.assertEqual(po.user_login_fail(), "用户名必须由4-20位字母数字组成")
Exemplo n.º 3
0
 def test_navigationAdd26(self):
     """ 输入框输入特殊字符,选择任意标签,点击添加按钮 """
     self.na_add().na_navigation_add_text_label_btn(name="!@#")
     Function.insert_img(self.driver, "NavigationAdd_输入特殊字符有标签.jpg")
     # 校验弹框文本错误提示是否为“*导航名称不能含有特殊字符”
     self.assertEqual(self.na_add().navigation_add_fail_text(),
                      "*导航名称不能含有特殊字符")
Exemplo n.º 4
0
 def test_navigation15(self):
     """ 点击导航报告厅 """
     self.na().login_front()
     self.na().na_check('报告厅')
     Function.insert_img(self.driver, "Navigation_切换到报告厅.jpg")
     # 校验页面数据中是否出现“设置报告模板”文字
     self.assertEqual(self.na().navigation_auditorium_text(), "设置报告模板")
Exemplo n.º 5
0
 def test_navigation16(self):
     """ 点击导航业务统计 """
     self.na().login_front()
     self.na().na_check('业务统计')
     Function.insert_img(self.driver, "Navigation_切换到业务统计.jpg")
     # 校验页面数据中是否出现“时间”文字
     self.assertEqual(self.na().navigation_business_text(), "时间")
Exemplo n.º 6
0
 def test_navigation14(self):
     """ 点击导航告警预测 """
     self.na().login_front()
     self.na().na_check('告警预测')
     Function.insert_img(self.driver, "Navigation_切换到告警预测.jpg")
     # 校验页面数据中是否出现“告警提醒设置”文字
     self.assertEqual(self.na().navigation_alarm_text(), "告警提醒设置")
Exemplo n.º 7
0
 def test_navigation13(self):
     """ 点击信息监控 """
     self.na().login_front()
     self.na().na_check('信息监控')
     Function.insert_img(self.driver, "Navigation_切换到信息监控.jpg")
     # 校验页面数据中是否出现“+添加标签”文字
     self.assertEqual(self.na().navigation_monitor_text(), "+添加标签")
Exemplo n.º 8
0
 def test_navigation12(self):
     """ 点击导航首页 """
     self.na().login_front()
     self.na().na_check('首页')
     Function.insert_img(self.driver, "Navigation_切换到首页.jpg")
     # 校验页面数据中是否出现“告警信息”文字
     self.assertEqual(self.na().navigation_home_text(), "告警信息")
Exemplo n.º 9
0
 def test_navigation17(self):
     """ 点击导航专题分析 """
     self.na().login_front()
     self.na().na_check('专题分析')
     Function.insert_img(self.driver, "Navigation_切换到专题分析.jpg")
     # 校验页面数据中是否出现“生成专题”文字
     self.assertEqual(self.na().navigation_analysis_text(), "生成专题")
Exemplo n.º 10
0
 def test_navigationAdd1(self):
     """ 导航设置中新增按钮 “+” 校验 """
     self.na_add().na_navigation_add()
     self.na_add().navigation_add_add()
     Function.insert_img(self.driver, "NavigationAdd_导航设置加号点击成功.jpg")
     # 校验导航名称输入框是否为空
     self.assertEqual(self.na_add().navigation_add_name_text(), "")
Exemplo n.º 11
0
 def test_navigationAdd25(self):
     """ 输入框输入大于十位字符,选择任意标签,点击添加按钮 """
     self.na_add().na_navigation_add_text_label_btn(name="测试导航长度测试导航长度")
     Function.insert_img(self.driver, "NavigationAdd_长度大于十位有标签.jpg")
     # 校验弹框文本错误提示是否为“*导航名称不能超过十个字符”
     self.assertEqual(self.na_add().navigation_add_fail_text(),
                      "*导航名称不能超过十个字符")
Exemplo n.º 12
0
 def test_navigation11(self):
     """ 点击LOGO图标 """
     self.na().login_front()
     self.na().navigation_logo()
     Function.insert_img(self.driver, "Navigation_切换到LOGO图标.jpg")
     # 校验页面数据中是否出现“告警信息”文字
     self.assertEqual(self.na().navigation_logo_text(), "告警信息")
Exemplo n.º 13
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")
Exemplo n.º 14
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")
Exemplo n.º 15
0
 def test_PeAccountPwd220(self):
     """ 输入正确的真实姓名、微信号、邮箱、手机,点击保存 """
     text = self.pap().account_unified('纪明朋', 'EraPose',
                                       '*****@*****.**',
                                       '17777786550')
     # 校验提示是否为“保存成功”
     self.assertEqual(text, "保存成功")
     Function.insert_img(self.driver, "PeAccountPwd_个人信息输入正确.jpg")
Exemplo n.º 16
0
 def test_PeAccountPwd219(self):
     """ 个人信息,直接点击保存 """
     self.pap().front()
     self.pap().account_button()
     text = self.pap().account_success_text()
     # 校验提示是否为“保存成功”
     self.assertEqual(text, "保存成功")
     Function.insert_img(self.driver, "PeAccountPwd_个人信息直接点击保存.jpg")
Exemplo n.º 17
0
 def test_PeAccountPwd118(self):
     """ 旧密码输入正确,新密码和确认密码输入6-12位数字字母_,且相等 """
     self.pap().front()
     self.pap().password_unified('123456', '123456', '123456')
     text = loginPage.Login(self.driver).login_notice_text()
     # 校验错误提示是否为“尊敬的客户:”
     self.assertEqual(text, "尊敬的客户:")
     Function.insert_img(self.driver, "PeAccountPwd_修改密码全部输入正确.jpg")
Exemplo n.º 18
0
 def test_PeAccountPwd117(self):
     """ 新密码和确认输入密码6-12位数字字母_,但是内容不一致 """
     self.pap().front()
     self.pap().password_unified('123456', '123456789', '123456987')
     text = self.pap().password_confirm_error_text()
     # 校验错误提示是否为“与新密码不一致,请重新输入”
     self.assertEqual(text, "与新密码不一致,请重新输入")
     Function.insert_img(self.driver, "PeAccountPwd_新密码和确认密码不一致.jpg")
Exemplo n.º 19
0
 def test_navigation24(self):
     """ 点击个人中心客服帮助 """
     self.na().na_personal()
     self.na().na_personal_check("客服帮助")
     Function.insert_img(self.driver, "Navigation_切换到客服帮助.jpg")
     # 校验页面数据中是否出现“向网智天元反馈问题”文字
     self.assertEqual(self.na().navigation_personal_customerservice_text(),
                      "向网智天元反馈问题")
Exemplo n.º 20
0
 def test_navigationDel31(self):
     """ 选择测试导航进行删除,弹框后选择否 """
     self.na_add().na_navigation_add_newnavigation_operation("测试导航")
     self.na_add().navigation_add_navigation_del_button_no()
     Function.insert_img(self.driver, "NavigationAdd_导航删除选否.jpg")
     # 校验导航名称是否存在为“测试导航,存在”
     self.assertEqual(
         self.na_add().na_navigation_add_newnavigation_if("测试导航"), True)
Exemplo n.º 21
0
 def test_PeAccountPwd102(self):
     """ 旧密码输入为空格,其他项6-12位数字字母_,点击保存 """
     self.pap().front()
     self.pap().password_unified(' ', '123456', '123456')
     text = self.pap().password_old_error_text()
     # 校验错误提示是否为“旧密码不能为空”
     self.assertEqual(text, "旧密码不能为空")
     Function.insert_img(self.driver, "PeAccountPwd_旧密码输入为空格.jpg")
Exemplo n.º 22
0
 def test_navigation18(self):
     """ 点击自定义导航 """
     self.na().login_front()
     custom = self.na().na_custom()[0]
     self.na().na_check(custom)
     Function.insert_img(self.driver, "Navigation_切换到自定义.jpg")
     # 校验页面数据中是否出现“自定义”文字
     self.assertEqual(self.na().navigation_custom_text(), custom)
Exemplo n.º 23
0
 def test_PeAccountPwd105(self):
     """ 旧密码输入非6-12位数字字母_,其他项6-12位数字字母_,点击保存 """
     self.pap().front()
     self.pap().password_unified('123¥#@#¥', '123456', '123456')
     text = self.pap().password_old_error_text()
     # 校验错误提示是否为“密码必须是由 6-12位字母数字_ 组合”
     self.assertEqual(text, "密码必须是由 6-12位字母数字_ 组合")
     Function.insert_img(self.driver, "PeAccountPwd_旧密码输入非6-12位数字字母_.jpg")
Exemplo n.º 24
0
 def test_navigation26(self):
     """ 点击个人中心退出系统 """
     self.na().na_personal()
     self.na().na_personal_check("退  出")
     Function.insert_img(self.driver, "Navigation_退出系统.jpg")
     # 校验页面数据中是否出现“尊敬的客户:”文字
     self.assertEqual(
         loginPage.Login(self.driver).login_notice_text(), "尊敬的客户:")
Exemplo n.º 25
0
 def test_navigationAdd22(self):
     """ 输入框为空,不选择标签,点击添加按钮 """
     self.na_add().na_navigation_add()
     self.na_add().navigation_add_js()
     self.na_add().navigation_add_button()
     Function.insert_img(self.driver, "NavigationAdd_输入框为空无标签.jpg")
     # 校验错误弹框文本是否为“请选择至少一个标签”
     self.assertEqual(self.na_add().navigation_add_null_text(), "请选择至少一个标签")
Exemplo n.º 26
0
 def test_PeAccountPwd109(self):
     """ 新密码输入大于12位,其他项6-12位数字字母_,点击保存 """
     self.pap().front()
     self.pap().password_unified('123456', '1234567890123', '123456')
     text = self.pap().password_new_error_text()
     # 校验错误提示是否为“密码必须是由 6-12位字母数字_ 组合”
     self.assertEqual(text, "密码必须是由 6-12位字母数字_ 组合")
     Function.insert_img(self.driver, "PeAccountPwd_新密码输入大于12位.jpg")
Exemplo n.º 27
0
 def test_PeAccountPwd111(self):
     """ 确认密码输入为空,其他项6-12位数字字母_,点击保存 """
     self.pap().front()
     self.pap().password_unified('123456', '123456', '')
     text = self.pap().password_confirm_error_text()
     # 校验错误提示是否为“确认密码不能为空”
     self.assertEqual(text, "确认密码不能为空")
     Function.insert_img(self.driver, "PeAccountPwd_确认密码输入为空.jpg")
Exemplo n.º 28
0
 def test_PeAccountPwd115(self):
     """ 确认密码输入非6-12位数字字母_,点击保存 """
     self.pap().front()
     self.pap().password_unified('123456', '123456', '123fd#@')
     text = self.pap().password_confirm_error_text()
     # 校验错误提示是否为“与新密码不一致,请重新输入”
     self.assertEqual(text, "与新密码不一致,请重新输入")
     Function.insert_img(self.driver, "PeAccountPwd_确认密码输入非6-12位数字字母_.jpg")
Exemplo n.º 29
0
 def test_navigationDel32(self):
     """ 选择测试导航进行删除,弹框后选择是 """
     self.na_add().na_navigation_add_newnavigation_operation("测试导航")
     self.na_add().navigation_add_navigation_del_button_yes()
     Function.insert_img(self.driver, "NavigationAdd_导航成功删除.jpg")
     # 校验导航名称是否存在为“测试导航,不存在”
     self.assertFalse(
         self.na_add().na_navigation_add_newnavigation_if("测试导航"), False)
Exemplo n.º 30
0
 def test_navigation23(self):
     """ 点击个人中心收藏关注 """
     self.na().na_personal()
     self.na().na_personal_check("收藏关注")
     Function.insert_img(self.driver, "Navigation_切换到收藏关注.jpg")
     # 校验页面数据中是否出现“收藏时间”文字
     self.assertEqual(
         self.na().navigation_personal_collectionattention_text(), "收藏时间")