def setUp_test_ZYSX_0001(): Preconditions.select_mobile('Android-移动') mp = MessagePage() mp.wait_for_page_load() if mp.is_on_this_page(): mp.click_workbench() wbp = WorkbenchPage() wbp.wait_for_workbench_page_load() # 查找并点击所有展开元素 wbp.find_and_click_open_element() if wbp.is_text_present("ateam7272"): wbp.click_setting_icon() wbp.click_text_or_description("默认团队") wbp.click_text_or_description("测试团队1") wbp.click_text_or_description("确定") time.sleep(2) wbp.click_setting_back() wbp.click_message_icon() Preconditions.enter_important_matters_page() return imp = ImportantMattersPage() if imp.is_on_important_matters_page(): current_mobile().hide_keyboard_if_display() else: current_mobile().launch_app() Preconditions.make_already_in_message_page() Preconditions.enter_important_matters_page()
def test_CJQ_0002(self): """发送群消息""" wbp = WorkbenchPage() wbp.wait_for_workbench_page_load() # 1.进入消息页面,进入指定群名企业群 wbp.click_message_icon() Preconditions.get_into_group_chat_page("测试企业群") gcp = GroupChatPage() # 2.输入发送信息 gcp.input_message('大家好,这里是测试消息') # 3.点击发送 gcp.send_message() # 4.验证是否发送成功 gcp.wait_for_msg_send_status_become_to('发送成功', 30)