Example #1
0
 def test_contacts_quxinli_0330(self):
     """公众号会话页面发送链接消息"""
     ContactsPage().click_official_account_icon()
     time.sleep(1)
     OfficialAccountPage().select_one_account_by_name('和飞信新闻')
     official_account = OfficialAccountPage()
     official_account.click_input_box()
     keyword = "https://www.baidu.com/"
     official_account.input_message(keyword)
     official_account.click_send_button()
     time.sleep(1)
     official_account.click_send_detail(keyword)
     time.sleep(2)
     # 返回通讯录页面
     official_account.click_back_by_android(3)
Example #2
0
 def test_contacts_quxinli_0331(self):
     """公众号会话页面网络异常情况下发送消息"""
     ContactsPage().click_official_account_icon()
     time.sleep(1)
     OfficialAccountPage().select_one_account_by_name('和飞信新闻')
     official_account = OfficialAccountPage()
     # 断网
     official_account.set_network_status(0)
     official_account.click_input_box()
     official_account.input_message('和飞信')
     official_account.click_send_button()
     time.sleep(2)
     official_account.page_should_contain_element_unsent()
     # 回复网络 发送成功
     official_account.set_network_status(6)
     time.sleep(3)
     official_account.click_element_unsent()
     official_account.click_sure_resent()
     time.sleep(2)
     official_account.page_not_contain_element_unsent()
     # 返回通讯录页面
     official_account.click_back_by_android(2)