예제 #1
0
 def test_contacts_quxinli_0326(self):
     """公众号会话页面发送文本消息"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(2)
     official.click_input_box()
     official.input_message('good news')
     official.click_send_button()
     official.page_should_not_contain_sendfail_element()
     official.page_should_contain_text('good news')
예제 #2
0
 def test_contacts_quxinli_0329(self):
     """公众号会话页面,发送长信息"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(2)
     official.click_input_box()
     mesaage = str('good news'*10)
     official.input_message([mesaage])
     official.click_send_button()
     official.page_should_not_contain_sendfail_element()
     official.page_should_contain_text(mesaage)
예제 #3
0
 def test_contacts_quxinli_0327(self):
     """公众号会话页面发送表情消息"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(2)
     official.click_expression()
     official.click_expression('[微笑1]')
     official.click_send_button()
     time.sleep(1)
     official.click_expression('expression_keyboard')
     official.page_should_not_contain_sendfail_element()
     official.page_should_contain_text('[微笑1]')
예제 #4
0
 def test_contacts_quxinli_0328(self):
     """公众号会话页面,发送表情+信息"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(2)
     official.input_message('good news')
     # official.click_expression()
     # official.click_expression('[微笑1]')
     time.sleep(2)
     official.click_send_button()
     time.sleep(1)
     # official.click_expression('expression_keyboard')
     official.page_should_not_contain_sendfail_element()
     official.page_should_contain_text('good news')
예제 #5
0
 def test_contacts_quxinli_0330(self):
     """公众号会话页面发送链接消息"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(2)
     official.click_input_box()
     mesaage ='www.otherpages.com'
     official.input_message(mesaage)
     official.click_send_button()
     official.page_should_not_contain_sendfail_element()
     official.page_should_contain_text(mesaage)
     official.click_baidu_button()
     time.sleep(8)
     if official.is_text_present('权限'):
         official.click_always_allowed()
     official.page_should_contain_text("百度一下")
예제 #6
0
 def test_contacts_quxinli_0331(self):
     """公众号会话页面网络异常情况下发送消息"""
     conts_page = ContactsPage()
     official = OfficialAccountPage()
     official.click_officel_account()
     #断网发送失败
     conts_page.set_network_status(0)
     time.sleep(2)
     official.click_input_box()
     official.input_message()
     official.click_send_button()
     time.sleep(1)
     official.page_should_contain_sendfail_element()
     ##恢复网络,重发成功
     conts_page.set_network_status(6)
     time.sleep(5)
     official.click_repeat_button()
     official.click_sure_button()
     time.sleep(2)
     official.page_should_not_contain_sendfail_element()