Ejemplo n.º 1
0
 def test4_mark_as_unstar(self):
     """测试页面全部邮件标记为星标"""
     # 快捷登录网页
     pl = PageLogin(self.driver)
     pl.quick_login()
     # 进入收件箱,并全选
     ree = ReceiveEmail(self.driver)
     ree.goto_inbox()
     self.driver.switch_to.frame("mainFrame")
     ree.all_check()
     # 标记为星标邮件
     ree.mark_as_unstar()
     # 验证已标记为星标
     self.driver.switch_to.default_content()
     assert (ree.star_mail_statistics() == "0"), "标记星标邮件失败"
Ejemplo n.º 2
0
 def test4_del_all(self):
     """全部勾选删除"""
     # 快捷登录网页
     pl = PageLogin(self.driver)
     pl.quick_login()
     # 进入收件箱
     ree = ReceiveEmail(self.driver)
     ree.goto_inbox()
     # 全部勾选
     self.driver.switch_to.frame("mainFrame")
     ree.all_check()
     # 删除勾选的邮件
     ree.del_email()
     sleep(1)
     # 删除会出现提示
     self.driver.switch_to.default_content()
     assert (ree.get_message_box() == "删除成功 [撤销]"), "未删除成功"
Ejemplo n.º 3
0
 def test4_del_all(self):
     """全部勾选彻底删除"""
     # 快捷登录网页
     pl = PageLogin(self.driver)
     pl.quick_login()
     # 进入收件箱
     ree = ReceiveEmail(self.driver)
     ree.goto_inbox()
     # 全部勾选
     self.driver.switch_to.frame("mainFrame")
     ree.all_check()
     # 删除勾选的邮件
     ree.completely_del_email()
     # 删除会出现提示
     self.driver.switch_to.default_content()
     ree.prompt_confirmation(0)
     assert (ree.get_message_box() == "删除成功 [撤销]"), "未删除成功"
     # 切换到已删除目录,查看彻底删除的邮件是否存在
     ree.verify_complete_deletion()
Ejemplo n.º 4
0
 def test4_move_to_sent(self):
     """测试勾选当页全部邮件移动到已发送"""
     # 快捷登录网页
     pl = PageLogin(self.driver)
     pl.quick_login()
     # 先进入已发送目录,得到初始的已发送信件数:mail_num1
     ree = ReceiveEmail(self.driver)
     mail_num1 = ree.sent_mail_statistics()
     # 进入收件箱,并全选
     ree.goto_inbox()
     self.driver.switch_to.frame("mainFrame")
     ree.all_check()
     # 移动到已发送目录,对提示信息进行验证
     ree.move_to_sent()
     sleep(1)
     self.driver.switch_to.default_content()
     ree.prompt_confirmation(1)
     # TODO:类似这种地方是否要使用try,之后再做修改吧
     assert (ree.get_message_box() == "已将邮件成功移动 [查看] [撤销]"), "移动信件失败"
     # 进一步验证已发送目录下的信件有没有增加,获取已发送信件数量:mail_num2
     mail_num2 = ree.sent_mail_statistics()
     assert (int(mail_num2) - int(mail_num1) == 25), "信件没有移动到已发送目录"