Exemplo n.º 1
0
    def test_msg_huangcaizui_A_0052(self):
        single = SingleChatPage()
        mess = MessagePage()
        chatdialog = ChatNoticeDialog()
        # 如果当前页面不存在消息,发送一条消息
        if not mess._is_element_present(
            (MobileBy.XPATH, '//*[@text ="给个红包1"]')):
            # 点击+号
            mess.click_add_icon()
            mess.click_new_message()
            select_page = SelectContactsPage()
            select_page.select_one_contact_by_name('给个红包1')

            # 若存在资费提醒对话框,点击确认
            if chatdialog.is_exist_tips():
                chatdialog.accept_and_close_tips_alert()
            single.input_text_message('呵呵哒')
            single.send_text()
            single.click_back()
            mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
        else:
            mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
            # 若存在资费提醒对话框,点击确认
            if chatdialog.is_exist_tips():
                chatdialog.accept_and_close_tips_alert()
        single.wait_for_page_load()
    def test_msg_hanjiabin_0192(self):
        mess = MessagePage()
        singlechat = SingleChatPage()
        # Step 1.进入一对一聊天窗口
        mess.search_and_enter_631('给个名片1')
        ContactDetailsPage().click_message_icon()
        chatdialog = ChatNoticeDialog()
        # 若存在资费提醒对话框,点击确认
        if chatdialog.is_exist_tips():
            chatdialog.accept_and_close_tips_alert()
        singlechat.click_more()
        singlechat.click_profile()

        selectcontact = SelectLocalContactsPage()
        send_card = Send_CardNamePage()
        # Checkpoint 进入到联系人选择器页面
        selectcontact.wait_for_page_load()
        # Step 任意选中一个联系人的名片,发送出去
        ContactsSelector().click_local_contacts('给个名片2')
        time.sleep(2)
        send_card.click_share_btn()
        send_card.press_mess('给个名片2')
        singlechat.select_collect_item()
        mess.click_back_by_android(times=3)
        mess.click_me_icon()
        me = MePage()
        me.click_collection()
        mess.is_text_present('[名片]给个名片2的个人名片')
Exemplo n.º 3
0
    def test_msg_huangcaizui_A_0182(self):
        single = SingleChatPage()
        mess = MessagePage()

        # 如果当前页面不存在消息,发送一条消息
        if not mess._is_element_present(
            (MobileBy.XPATH, '//*[@text ="给个红包1"]')):
            # 点击+号
            mess.click_add_icon()
            mess.click_new_message()
            select_page = SelectContactsPage()
            select_page.select_one_contact_by_name('给个红包1')
        else:
            mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
        chatdialog = ChatNoticeDialog()
        # 若存在资费提醒对话框,点击确认
        if chatdialog.is_exist_tips():
            chatdialog.accept_and_close_tips_alert()
        # 如果当前页面不存在消息,发送一条消息
        if single._is_element_present((MobileBy.XPATH, '//*[@text ="呵呵哒"]')):
            single.press_mess('呵呵哒')
            mess.click_element((MobileBy.XPATH, '//*[@text ="删除"]'))
        single.input_text_message("呵呵哒")
        single.send_text()
        single.press_mess('呵呵哒')
        mess.click_element((MobileBy.XPATH, '//*[@text ="撤回"]'))
        single.click_i_know()
        time.sleep(3)
        mess.page_should_contain_element(
            (MobileBy.XPATH, '//*[@text ="你撤回了一条信息"]'))
Exemplo n.º 4
0
 def test_msg_huangcaizui_A_0151(self):
     single = SingleChatPage()
     mess = MessagePage()
     chat_set = SingleChatSetPage()
     findchat = FindChatRecordPage()
     # 如果当前页面不存在消息,发送一条消息
     if not mess._is_element_present(
         (MobileBy.XPATH, '//*[@text ="给个红包1"]')):
         # 点击+号
         mess.click_add_icon()
         mess.click_new_message()
         select_page = SelectContactsPage()
         select_page.select_one_contact_by_name('给个红包1')
     else:
         mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     self.assertTrue(single.is_exist_send_audio_button())
     single.input_text_message(
         "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
     )
     self.assertTrue(single.is_exist_send_txt_button())
     single.send_text()
     time.sleep(1)
     mess.page_should_contain_element(
         (MobileBy.XPATH, '//*[@text ="已转短信送达"]'))
Exemplo n.º 5
0
 def test_msg_huangcaizui_A_0100(self):
     single = SingleChatPage()
     mess = MessagePage()
     chat_set = SingleChatSetPage()
     findchat = FindChatRecordPage()
     # 如果当前页面不存在消息,发送一条消息
     if not mess._is_element_present(
         (MobileBy.XPATH, '//*[@text ="给个红包1"]')):
         # 点击+号
         mess.click_add_icon()
         mess.click_new_message()
         select_page = SelectContactsPage()
         select_page.select_one_contact_by_name('给个红包1')
     else:
         mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     # 如果当前页面不存在消息,发送一条消息
     if single._is_element_present((MobileBy.XPATH, '//*[@text ="呵呵哒"]')):
         single.press_mess('呵呵哒')
         mess.click_element((MobileBy.XPATH, '//*[@text ="删除"]'))
     single.input_text_message("呵呵哒")
     single.send_text()
     single.press_mess('呵呵哒')
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text ="复制"]'))
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text ="转发"]'))
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text ="收藏"]'))
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text ="删除"]'))
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text ="撤回"]'))
     mess.page_should_contain_element(
         (MobileBy.XPATH, '//*[@text ="转为短信发送"]'))
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text ="多选"]'))
Exemplo n.º 6
0
 def test_msg_huangcaizui_A_0078(self):
     single = SingleChatPage()
     mess = MessagePage()
     chat_set = SingleChatSetPage()
     findchat = FindChatRecordPage()
     # 如果当前页面不存在消息,发送一条消息
     if not mess._is_element_present(
         (MobileBy.XPATH, '//*[@text ="给个红包1"]')):
         # 点击+号
         mess.click_add_icon()
         mess.click_new_message()
         select_page = SelectContactsPage()
         select_page.select_one_contact_by_name('给个红包1')
     else:
         mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     single.click_setting()
     chat_set.is_on_this_page()
     chat_set.search_chat_record()
     findchat.wait_for_page_loads()
     findchat.input_search_message('ADDWOQWIQWOPPQWIDIWQDQW')
     mess.page_should_contain_element(
         (MobileBy.XPATH, '//*[@text ="无搜索结果"]'))
Exemplo n.º 7
0
 def test_msg_hanjiabin_0179(self):
     mess = MessagePage()
     # 点击消息页搜索
     mess.click_search()
     # 搜索关键词给个红包1
     SearchPage().input_search_keyword("给个名片1")
     # 选择联系人进入联系人页
     mess.choose_chat_by_name('给个名片1')
     # 点击消息按钮发送消息
     ContactDetailsPage().click_message_icon()
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     mess.click_element((MobileBy.ID, 'com.chinasofti.rcs:id/ib_more'))
     mess.click_element((MobileBy.XPATH, '//*[@text="名片"]'))
     mess.click_element((
         MobileBy.XPATH,
         '//*[@resource-id="com.chinasofti.rcs:id/contact_name" and @text="给个名片2"]'
     ))
     send_card = Send_CardNamePage()
     send_card.assert_card_name_equal_to('给个名片2')
     send_card.is_present_card_phone('13800138300')
     send_card.assert_card_comp_equal_to('中软国际')
     send_card.assert_card_emailaddress_equal_to('*****@*****.**')
     send_card.assert_card_position_equal_to('软件工程师')
     send_card.click_close_btn()
     # 判断存在选择联系人
     SelectContactPage().is_exist_select_contact_btn()
Exemplo n.º 8
0
 def test_msg_hanjiabin_0195(self):
     mess = MessagePage()
     # 点击消息页搜索
     mess.click_search()
     # 搜索关键词给个红包1
     SearchPage().input_search_keyword("给个名片1")
     # 选择联系人进入联系人页
     mess.choose_chat_by_name('给个名片1')
     # 点击消息按钮发送消息
     ContactDetailsPage().click_message_icon()
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     mess.click_element((MobileBy.ID, 'com.chinasofti.rcs:id/ib_more'))
     mess.click_element((MobileBy.XPATH, '//*[@text="名片"]'))
     mess.click_element((
         MobileBy.XPATH,
         '//*[@resource-id="com.chinasofti.rcs:id/contact_name" and @text="给个名片2"]'
     ))
     send_card = Send_CardNamePage()
     send_card.click_share_btn()
     send_card.press_mess('给个名片2')
     mess.click_element((MobileBy.XPATH, '//*[@text="多选"]'))
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text="删除"]'))
     mess.page_should_contain_element((MobileBy.XPATH, '//*[@text="转发"]'))
     mess.click_element((MobileBy.XPATH, '//*[@text="删除"]'))
Exemplo n.º 9
0
 def test_msg_huangcaizui_A_0064(self):
     single = SingleChatPage()
     mess = MessagePage()
     # 如果当前页面不存在消息,发送一条消息
     if not mess._is_element_present(
         (MobileBy.XPATH, '//*[@text ="给个红包1"]')):
         # 点击+号
         mess.click_add_icon()
         mess.click_new_message()
         select_page = SelectContactsPage()
         select_page.select_one_contact_by_name('给个红包1')
     else:
         mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     single.click_setting()
     self.assertTrue(SingleChatSetPage().is_on_this_page())
Exemplo n.º 10
0
 def test_msg_hanjiabin_0187(self):
     mess = MessagePage()
     # 点击消息页搜索
     mess.click_search()
     # 搜索关键词给个红包1
     SearchPage().input_search_keyword("给个红包1")
     # 选择联系人进入联系人页
     mess.choose_chat_by_name('给个红包1')
     # 点击消息按钮发送消息
     ContactDetailsPage().click_message_icon()
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     current_mobile().set_network_status(1)
     single = SingleChatPage()
     single.input_text_message("测试一个呵呵")
     single.send_text()
     time.sleep(2)
     chatwindow = ChatWindowPage()
     chatwindow.click_resend_button()
     current_mobile().set_network_status(6)
Exemplo n.º 11
0
 def test_msg_huangcaizui_A_0184(self):
     mess = MessagePage()
     # 点击消息页搜索
     mess.click_search()
     # 搜索关键词给个红包1
     SearchPage().input_search_keyword("给个红包1")
     # 选择联系人进入联系人页
     mess.choose_chat_by_name('给个红包1')
     # 点击消息按钮发送消息
     ContactDetailsPage().click_message_icon()
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     single = SingleChatPage()
     # 如果当前页面不存在消息,发送一条消息
     if not single._is_element_present(
         (MobileBy.XPATH, '//*[@text ="测试一个呵呵"]')):
         single.input_text_message("测试一个呵呵")
         single.send_text()
     single.press_mess("测试一个呵呵")
     single.click_multiple_selection()
     time.sleep(2)
     group_chat = GroupChatPage()
     # 勾选消息时校验页面元素
     self.assertTrue(group_chat.is_exist_multiple_selection_back())
     mess.page_should_contain_text('已选择')
     self.assertTrue(group_chat.is_exist_multiple_selection_count())
     self.assertTrue(group_chat.is_enabled_multiple_selection_delete())
     self.assertTrue(group_chat.is_enabled_multiple_selection_forward())
     # 未勾选消息时校验页面元素
     group_chat.get_multiple_selection_select_box()[0].click()
     time.sleep(1)
     self.assertTrue(group_chat.is_exist_multiple_selection_back())
     mess.page_should_contain_text('未选择')
     self.assertFalse(group_chat.is_exist_multiple_selection_count())
     self.assertFalse(group_chat.is_enabled_multiple_selection_delete())
     self.assertFalse(group_chat.is_enabled_multiple_selection_forward())
Exemplo n.º 12
0
 def test_msg_huangcaizui_A_0072(self):
     single = SingleChatPage()
     mess = MessagePage()
     chat_set = SingleChatSetPage()
     findchat = FindChatRecordPage()
     # 如果当前页面不存在消息,发送一条消息
     if not mess._is_element_present(
         (MobileBy.XPATH, '//*[@text ="给个红包1"]')):
         # 点击+号
         mess.click_add_icon()
         mess.click_new_message()
         select_page = SelectContactsPage()
         select_page.select_one_contact_by_name('给个红包1')
     else:
         mess.click_element((MobileBy.XPATH, '//*[@text ="给个红包1"]'))
     chatdialog = ChatNoticeDialog()
     # 若存在资费提醒对话框,点击确认
     if chatdialog.is_exist_tips():
         chatdialog.accept_and_close_tips_alert()
     # 如果当前页面不存在消息,发送一条消息
     if not single._is_element_present(
         (MobileBy.XPATH, '//*[@text ="呵呵哒"]')):
         single.input_text_message("呵呵哒")
         single.send_text()
     single.open_expression()
     count = 0
     while (count <= 10):
         single.select_expression()
         count = count + 1
     single.close_expression()
     single.click_setting()
     chat_set.is_on_this_page()
     chat_set.search_chat_record()
     findchat.wait_for_page_loads()
     findchat.input_search_message('呵呵哒')
     findchat.click_record()
     CallPage().wait_for_chat_page()
Exemplo n.º 13
0
    def test_msg_weifenglian_1V1_0268(self):
        """验证转发文件到当前单聊会话窗口,文件发送失败的重发按钮,点击确定时是否正常发送"""
        # 1、当前在单聊会话窗口页面
        # 2、当前会话页面有发送失败的文件
        MessagePage().search_and_enter_631('给个名片1')
        ContactDetailsPage().click_message_icon()
        chatdialog = ChatNoticeDialog()
        # 若存在资费提醒对话框,点击确认
        if chatdialog.is_exist_tips():
            chatdialog.accept_and_close_tips_alert()

        single_chat = SingleChatPage()
        single_chat.click_file()
        csf = ChatSelectFilePage()
        csf.wait_for_page_load()
        csf.click_local_file()
        time.sleep(2)
        single_chat.set_network_status(1)
        file_name = '录制.txt'
        path = 'aaaresource'
        single_chat.send_file_messages_631(path, file_name)
        time.sleep(2)
        single_chat.click_msg_send_failed_button(0)
        single_chat.click_sure()