Beispiel #1
0
    def test_msg_huangcaizui_B_0024(self):
        """在单聊页面中非首次点击发送短信按钮是否有短信资费介绍页--网络异常"""
        # 1.网络异常,本网用户
        # 2.客户端已登录
        # 3.已经使用过发送短信功能,短信设置开关已开启
        Preconditions.make_already_have_used_free_sms()
        # 4.在单聊会话页面
        Preconditions.enter_single_chat_page("测试号码")
        # Step: 1.点击下方发送短信按钮
        basepg = BaseChatPage()
        time.sleep(3)
        basepg.click_free_msg()
        time.sleep(2)
        # CheckPoint: 1.直接进入短信编辑页面
        self.assertTrue(basepg.is_exist_exit_sms())

        # Step: 2.编辑好短信,点击发送按钮
        basepg.input_free_message("测试短信,请勿回复")
        basepg.click_send_sms()
        time.sleep(1)
        if basepg.is_exist_send_button():
            basepg.click_send_button()

        time.sleep(2)
        # CheckPoint: 2.短信发送失败,toast提示:网络异常,请检查网络设置(IOS)
        self.assertTrue(SingleChatPage().is_msg_send_fail())

        basepg.click_exit_sms()
        basepg.click_back_by_android()
Beispiel #2
0
 def select_contact_send_sms(name):
     """选择联系人,发送短信"""
     Preconditions.make_already_have_used_free_sms()
     Preconditions.enter_single_chat_page(name)
     basepg = BaseChatPage()
     basepg.click_free_msg()
     time.sleep(2)
     basepg.input_free_message("测试短信,请勿回复")
     basepg.click_send_sms()
     if basepg.is_exist_send_button():
         basepg.click_send_button()
     basepg.click_exit_sms()
     basepg.click_back_by_android()
Beispiel #3
0
    def test_msg_huangcaizui_B_0035(self):
        """在单聊页面中非首次点击发送短信按钮是否有短信资费介绍页--无资费介绍"""
        # 1.网络正常,本网用户
        # 2.客户端已登录
        # 3.已经使用过发送短信功能,短信设置开关已开启
        Preconditions.make_already_have_used_free_sms()
        # 4.在单聊会话页面
        Preconditions.enter_single_chat_page("测试号码")
        # Step: 1.点击下方发送短信按钮
        basepg = BaseChatPage()
        basepg.click_free_msg()
        time.sleep(2)
        # CheckPoint: 1.直接进入短信编辑页面,无资费介绍页
        basepg.page_should_not_contain_text("欢迎使用免费短信")

        self.assertTrue(basepg.is_exist_exit_sms())
        basepg.click_exit_sms()
        basepg.click_back_by_android()