Example #1
0
 def test_sendGeneral_8_success(self):
     logging.info("*********发送普通短信用例:正常场景-定时发送提交成功*********")
     temp = True
     time_timeing = SendMsgPage(self.driver).func_basics(
         msgDatas.success_data["phone"], msgDatas.success_data["content"],
         msgDatas.success_data["time"], '定时发送')
     SendMsgPage(self.driver).send_suceedPop()  # 点击弹窗上的确认按钮
     time.sleep(2)
     # 获取当前时间
     flag = date_compare(time_timeing)  # 两个日期进行比较,为真返回True,反之flag
     time.sleep(2)
     # 定时时间和当前时间进行比较
     if flag == False:
         temp = SendMsgPage(self.driver).func_results(
             'approvalStatusStr', msgDatas.success_data["checkText"],
             '已发短信', 'mainFrame_30', 'sendStatus', 'statusCodeCh',
             'statusCodeEn', msgDatas.success_data["codeText"])
         self.assertTrue(temp)
     elif flag == True:
         msg_checkTrOne = SendMsgPage(
             self.driver).func_checkResults('approvalStatusStr')
         self.assertEqual(msgDatas.success_data["checkText1"],
                          msg_checkTrOne.text)
     # 断言判断与预期是否一致
     self.assertTrue(temp)
Example #2
0
 def test_sendGeneral_6_success(self):
     logging.info("*********发送普通短信用例:正常场景-立即发送取消发送*********")
     SendMsgPage(self.driver).func_basics(msgDatas.success_data["phone"],
                                          msgDatas.success_data["content"],
                                          msgDatas.success_data["time"],
                                          '立即发送')
     time.sleep(2)
     SendMsgPage(self.driver).send_filedPop()  # 点击取消按钮-关闭弹窗且不执行发送操作
Example #3
0
 def test_sendGeneral_1_error(self, data):
     logging.info("*********发送普通短信用例:异常场景-立即发送提交失败*********")
     SendMsgPage(self.driver).func_basics(data["phone"], data["content"],
                                          msgDatas.success_data["time"],
                                          '立即发送')
     # 断言 判断提示信息是否一致
     self.assertEqual(data["check"],
                      SendMsgPage(self.driver).get_errorMsg())
Example #4
0
 def test_sendGeneral_3_success(self, data):
     temp = True
     logging.info("*********发送普通短信用例:正常场景-提取号码总数*********")
     comm_frame(self.driver).Frame('mainFrame_26')  # 获取iframe
     SendMsgPage(self.driver).send_normal_msg(
         data['phone'], msgDatas.success_data["content"])
     temp = SendMsgPage(self.driver).func_verifyPhone(
         data["check1"], data["check2"], data["check3"], data["check4"])
     # 断言判断与预期是否一致
     self.assertTrue(temp)
Example #5
0
 def test_sendGeneral_4_success(self, data):
     logging.info("*********发送普通短信用例:正常场景-双回T提示语验证*********")
     i = 0
     while i < len(msgDatas.retreatStr):
         print(msgDatas.retreatStr[i])
         SendMsgPage(self.driver).func_doubleBasics(
             msgDatas.success_data["phone"], data["content"],
             msgDatas.retreatStr[i])
         # 断言:判断提示信息是否一致
         self.assertEqual(data["check"],
                          SendMsgPage(self.driver).get_popMsg())
         time.sleep(2)
         SendMsgPage(self.driver).send_filedPop()  # 点击弹窗上的关闭按钮
         i = i + 1
Example #6
0
 def test_sendGeneral_7_success(self):
     temp = True
     logging.info("*********发送普通短信用例:正常场景-立即发送提交成功*********")
     SendMsgPage(self.driver).func_basics(msgDatas.success_data["phone"],
                                          msgDatas.success_data["content"],
                                          msgDatas.success_data["time"],
                                          '立即发送')
     SendMsgPage(self.driver).send_suceedPop()  # 点击弹窗上的确认按钮
     time.sleep(4)
     temp = SendMsgPage(self.driver).func_results(
         'approvalStatusStr', msgDatas.success_data["checkText"], '已发短信',
         'mainFrame_30', 'sendStatus', 'statusCodeCh', 'statusCodeEn',
         msgDatas.success_data["codeText"])
     # 断言判断与预期是否一致
     self.assertTrue(temp)
Example #7
0
 def test_sendGeneral_2_success(self, data):
     logging.info("*********发送普通短信用例:正常场景-短信计费验证*********")
     comm_frame(self.driver).Frame('mainFrame_26')  # 获取iframe
     SendMsgPage(self.driver).send_normal_msg(
         msgDatas.success_data["phone"], data["content"])