示例#1
0
 def test_contacts_quxinli_0327(self):
     """公众号会话页面发送表情消息"""
     official_account = OfficialAccountPage()
     official_account.click_expression()
     official_account.click_expression_detail()
     official_account.click_send_button()
     time.sleep(2)
     #返回通讯录页面
     official_account.click_back()
     OfficialAccountPage().click_back()
示例#2
0
 def test_contacts_quxinli_0329(self):
     """公众号会话页面,发送长信息"""
     official_account = OfficialAccountPage()
     official_account.click_input_box()
     keyword = str("我" * 255)
     official_account.input_message([keyword])
     official_account.click_send_button()
     time.sleep(2)
     #返回通讯录页面
     official_account.click_back()
     OfficialAccountPage().click_back()
示例#3
0
 def test_contacts_quxinli_0328(self):
     """公众号会话页面,发送表情+信息"""
     official_account = OfficialAccountPage()
     official_account.click_input_box()
     official_account.input_message('和飞信')
     official_account.click_expression()
     official_account.click_expression_detail()
     official_account.click_send_button()
     time.sleep(2)
     #返回通讯录页面
     official_account.click_back()
     OfficialAccountPage().click_back()
示例#4
0
 def test_contacts_quxinli_0326(self):
     """公众号会话页面发送文本消息"""
     official_account = OfficialAccountPage()
     official_account.click_input_box()
     official_account.input_message('和飞信')
     official_account.click_send_button()
     time.sleep(2)
     official_account.page_should_contain_text('和飞信')
     #返回消息页面
     official_account.click_back()
     OfficialAccountPage().click_back()
     ContactsPage().click_message_icon()
示例#5
0
 def test_contacts_quxinli_0330(self):
     """公众号会话页面发送链接消息"""
     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()
     official_account.click_back()
     OfficialAccountPage().click_back()
示例#6
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)
示例#7
0
 def test_contacts_quxinli_0328(self):
     """公众号会话页面,发送表情+信息"""
     ContactsPage().click_official_account_icon()
     time.sleep(1)
     OfficialAccountPage().select_one_account_by_name('和飞信新闻')
     official_account = OfficialAccountPage()
     official_account.click_input_box()
     official_account.input_message('和飞信')
     # 备注:新版本无表情
     # official_account.click_expression()
     # official_account.click_expression_detail()
     official_account.click_send_button()
     time.sleep(2)
     # 返回通讯录页面
     official_account.click_back()
     OfficialAccountPage().click_back()
示例#8
0
 def test_contacts_quxinli_0331(self):
     """公众号会话页面网络异常情况下发送消息"""
     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()
     official_account.click_back()