def test_contacts_quxinli_0324(self):
     """公众号会话页面(未配置底部菜单栏)"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(2)
     official.page_contain_news()
     official.page_contain_setting()
     official.page_contain_input_box()
     official.page_contain_send_button()
Beispiel #2
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')
Beispiel #3
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)
Beispiel #4
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]')
Beispiel #5
0
    def test_contacts_quxinli_0335(self):
        """公众号详情-查看历史资讯"""
        official = OfficialAccountPage()
        official.click_officel_account()
        time.sleep(1)
        official.click_setting_button()
        official_detail = OfficialAccountDetailPage()

        official_detail.click_read_old_message()
        official_detail.wait_for_page_load()
        if official_detail.is_contain_old_mes():
            official_detail.page_contain_time()
        else:
            official_detail.page_should_contain_text('无历史推送资讯')
Beispiel #6
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')
Beispiel #7
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("百度一下")
Beispiel #8
0
 def test_contacts_quxinli_0332(self):
     """公众号会话页面右上角设置按钮"""
     official = OfficialAccountPage()
     official.click_officel_account()
     official.click_setting_button()
     time.sleep(2)
     official_account_detail=OfficialAccountDetailPage()
     official_account_detail.page_contain_public_title_name()
     official_account_detail.page_contain_public_name()
     official_account_detail.page_contain_public_header()
     official_account_detail.page_contain_public_number()
     official_account_detail.page_contain_features()
     official_account_detail.page_contain_certification()
     official_account_detail.page_should_contain_text('置顶公众号')
     official_account_detail.page_should_contain_text('查看历史资讯')
     official_account_detail.page_should_contain_text('进入公众号')
     time.sleep(2)
Beispiel #9
0
 def test_contacts_quxinli_0334(self):
     """公众号详情-置顶公众号"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(1)
     account_name = official.get_account_title()
     official.click_setting_button()
     time.sleep(1)
     # 点击置顶公众号
     official_detail = OfficialAccountDetailPage()
     official_detail.click_to_be_top()
     official.click_back_by_android(2)
     time.sleep(2)
     top_name = official.get_first_account()
     # 判断是否置顶
     time.sleep(1)
     self.assertEqual(account_name, top_name)
Beispiel #10
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()
Beispiel #11
0
 def tearDown_test_contacts_quxinli_0334():
     official = OfficialAccountPage()
     #返回公众号详情页面,取消置顶
     official.click_officel_account()
     official.click_setting_button()
     OfficialAccountDetailPage().click_to_be_top()
Beispiel #12
0
 def test_contacts_quxinli_0327(self):
     """公众号会话页面发送表情消息"""
     official = OfficialAccountPage()
     official.click_officel_account()
     time.sleep(2)