def test_msg_huangcaizui_B_0037(self): """删除短信""" # 1.网络正常,本网用户 # 2.客户端已登录 # 3.本机已发送短信 Preconditions.select_contact_send_sms("测试号码") # Step: 1、进入单聊会话页面 Preconditions.enter_single_chat_page("测试号码") # 2、长按短信 basepg = BaseChatPage() basepg.press_mess("测试短信,请勿回复") # 3、点击删除按钮 basepg.click_delete() # 4、确认删除(IOS) # SelectLocalContactsPage().click_sure_forward() # CheckPoint: 短信成功删除 basepg.page_should_not_contain_text("测试短信,请勿回复") time.sleep(2) if basepg.is_exist_exit_sms(): basepg.click_exit_sms() time.sleep(1) basepg.click_back_by_android()
def test_msg_huangcaizui_B_0036(self): """转发短信""" # 1.网络正常,本网用户 # 2.客户端已登录 # 3.本机已发送短信 Preconditions.make_already_have_used_free_sms2() # Step: 1、进入单聊会话页面 slc = SelectLocalContactsPage() slc.selecting_local_contacts_by_name("测试号码") basepg = BaseChatPage() time.sleep(2) basepg.input_free_message("测试短信,请勿回复") basepg.hide_keyboard() time.sleep(1) basepg.click_send_sms() time.sleep(2) # 2、长按短信 basepg.press_mess("测试短信,请勿回复") time.sleep(2) # 3、点击转发按钮 basepg.click_forward() time.sleep(2) # CheckPoint: 选择转发会调起联系人选择器,转发短信成功 basepg.page_should_contain_text("选择联系人") time.sleep(1) # 4、选择转发联系人 SelectContactsPage().search("14775970982") time.sleep(3) SelectContactsPage().select_one_contact_by_name('测试号码') # 5、点击发送 SelectLocalContactsPage().click_sure_forward() # CheckPoint: 选择转发会调起联系人选择器,转发短信成功 self.assertTrue(basepg.is_toast_exist("已转发")) time.sleep(2) if basepg.is_exist_exit_sms(): basepg.click_exit_sms() time.sleep(1) basepg.click_back_by_android()
def test_msg_huangcaizui_B_0040(self): """多选,批量转发与删除短信""" # 1.网络正常,本网用户 # 2.客户端已登录 # 3.本机已发送短信 Preconditions.select_contact_send_sms("测试号码") # Step: 1、进入单聊会话页面 Preconditions.enter_single_chat_page("测试号码") # 2、长按短信 basepg = BaseChatPage() basepg.press_mess("测试短信,请勿回复") # 3、点击多选按钮 basepg.click_multiple_selection() time.sleep(1) # CheckPoint: 成功进入多选模式,可批量转发与删除短信 basepg.page_should_contain_text("删除") basepg.page_should_contain_text("转发") time.sleep(1) basepg.click_back_by_android() if basepg.is_exist_exit_sms(): basepg.click_exit_sms() time.sleep(1) basepg.click_back_by_android()
def test_msg_huangcaizui_B_0023(self): """在单聊页面中非首次点击发送短信按钮是否有短信资费介绍页""" # 1.网络正常,本网用户 # 2.客户端已登录 # 3.已经使用过发送短信功能,短信设置开关已开启 Preconditions.make_already_have_used_free_sms2() # 4.在单聊会话页面 slc = SelectLocalContactsPage() slc.selecting_local_contacts_by_name("测试号码") # Step: 1.点击下方发送短信按钮 basepg = BaseChatPage() # 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.短信发送成功并返回短信编辑页面 self.assertTrue(basepg.is_exist_exit_sms()) basepg.click_exit_sms() basepg.click_back_by_android()