示例#1
0
 def test_msg_hanjiabin_0195(self):
     """名片消息——单聊——发出名片后--消息界面——长按"""
     mess = MessagePage()
     ChatMorePage().close_more()
     ChatMorePage().click_card()
     SelectContactsPage().click_one_contact_631("给个名片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="删除"]'))
示例#2
0
 def test_msg_huangcaizui_A_0182(self):
     """自己撤回文本消息,是否会起新的头像"""
     Preconditions.enter_single_chat_page("大佬2")
     single = SingleChatPage()
     mess = MessagePage()
     # 如果当前页面不存在消息,发送一条消息
     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 ="你撤回了一条信息"]'))
示例#3
0
 def test_msg_huangcaizui_A_0100(self):
     """长按消息体是否弹出多功能列表"""
     Preconditions.enter_single_chat_page("大佬2")
     single = SingleChatPage()
     mess = MessagePage()
     # 如果当前页面不存在消息,发送一条消息
     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('呵呵哒')
     single.page_should_contain_text("复制")
     single.page_should_contain_text("转发")
     single.page_should_contain_text("收藏")
     single.page_should_contain_text("撤回")
     single.page_should_contain_text("删除")
     single.page_should_contain_text("多选")
示例#4
0
 def test_msg_huangcaizui_A_0022(self):
     """免费/发送短信—选择手机联系人"""
     mess = MessagePage()
     # 点击+号
     mess.click_add_icon()
     # 点击免费短信
     mess.click_free_sms()
     mess_call_page = CallPage()
     freemsg = FreeMsgPage()
     # 若存在欢迎页面
     if freemsg.is_exist_welcomepage():
         # 点击确定按钮
         freemsg.click_sure_btn()
         time.sleep(2)
         # 若存在权限控制
         if mess_call_page.is_exist_allow_button():
             # 存在提示点击允许
             mess_call_page.wait_for_freemsg_load()
     mess.click_element((MobileBy.XPATH, '//*[@text ="测试短信1"]'))
     # 判断存在?标志
     FreeMsgPage().wait_is_exist_wenhao()
     # 判断存在退出短信按钮
     FreeMsgPage().wait_is_exist_exit()