def test_contacts_quxinli_0325(self): """公众号会话页面-已配置底部菜单栏的公众号""" ContactsPage().click_official_account_icon() time.sleep(1) OfficialAccountPage().select_one_account_by_name('和飞信') # 判断页面包含的元素 official_account = OfficialAccountPage() time.sleep(2) official_account.page_should_contain_text('和飞信') official_account.page_contain_setting() official_account.page_contain_keyboard() official_account.page_should_contain_element_menu() # 点击底部菜单,可以进入到菜单详情页 official_account.click_menu_name2() time.sleep(1) official_account.page_should_contain_text('多方电话') official_account.click_menu_detail_name1() time.sleep(4) official_account.click_menu_detail_back() # 点击键盘标志,页面显示输入框等 official_account.click_keyboard() official_account.page_contain_input_box() # official_account.page_contain_expresssion() official_account.page_contain_send_button() official_account.send_btn_is_clickable() time.sleep(2) # 再次点击键盘,又展示底部菜单 official_account.click_keyboard() official_account.page_should_contain_element_menu() time.sleep(2) # 返回消息页面 official_account.click_back() OfficialAccountPage().click_back() ContactsPage().click_message_icon()
def test_contacts_quxinli_0323(self): """企业号列表显示为空""" ContactsPage().click_official_account_icon() official_account = OfficialAccountPage() official_account.click_tag("企业号") time.sleep(1) official_account.page_should_contain_text('未关注任何企业号') official_account.assert_enterprise_account_list_is_empty() #返回通讯录页面 official_account.click_back()
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()
def test_contacts_quxinli_0322(self): """订阅号/服务号列表显示""" ContactsPage().click_official_account_icon() time.sleep(3) official_account = OfficialAccountPage() official_account.page_should_contain_text('中国移动10086') official_account.page_should_contain_text('和飞信') official_account.page_should_contain_text('和飞信团队') official_account.page_should_contain_text('和飞信新闻') # 返回通讯录页面 official_account.click_back()
def test_contacts_0322(self): """公众号列表为空""" ContactsPage().click_official_account_icon() official_account = OfficialAccountPage() official_account.click_tag("企业号") time.sleep(1) official_account.page_should_contain_text('未关注任何企业号') official_account.assert_enterprise_account_list_is_empty() #返回消息页面 official_account.click_back() ContactsPage().click_message_icon()
def test_contacts_0321(self): "公众号默认关注公众号检查" ContactsPage().click_official_account_icon() time.sleep(1) official_account = OfficialAccountPage() official_account.page_should_contain_text('中国移动10086') official_account.page_should_contain_text('和飞信') official_account.page_should_contain_text('和飞信团队') #返回消息页面 official_account.click_back() ContactsPage().click_message_icon()
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()
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()
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()
def test_contacts_quxinli_0327(self): """公众号会话页面发送表情消息""" ContactsPage().click_official_account_icon() time.sleep(1) OfficialAccountPage().select_one_account_by_name('和飞信新闻') 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()
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()
def test_contacts_quxinli_0324(self): """公众号会话页面-未配置底部菜单栏的公众号""" ContactsPage().click_official_account_icon() time.sleep(1) OfficialAccountPage().select_one_account_by_name('和飞信新闻') # 公众号详情页(未配置底部菜单栏) official_account = OfficialAccountPage() time.sleep(2) official_account.page_should_contain_text('和飞信新闻') official_account.page_contain_setting() official_account.page_contain_input_box() # official_account.page_contain_expresssion() official_account.page_contain_send_button() official_account.send_btn_is_clickable() # 返回通讯录页面 official_account.click_back() OfficialAccountPage().click_back()
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()