def test_ZZJG_0018(self): """搜索已经存在的成员姓名""" # 1、点击“组织架构”应用 # 2、搜索已存在成员姓名 osp = OrganizationStructurePage() time.sleep(2) osp.wait_for_page_load() slc = SelectLocalContactsPage() if osp.is_text_present("飞信电话"): pass else: osp.click_text("添加联系人") time.sleep(1) osp.click_text("从手机通讯录添加") time.sleep(2) sc = SelectContactsPage() # 搜索联系人 sc.input_search_contact_message("飞信") # 选择“和飞信电话”联系人进行转发 sc.click_one_contact("飞信电话") # slc.click_one_contact("和飞信电话") slc.click_sure() if not slc.is_toast_exist("操作成功"): raise AssertionError("操作不成功") time.sleep(2) if not osp.is_on_this_page(): raise AssertionError("没有返回上一级") osp.click_text("搜索") osp.input_search_box("飞信") time.sleep(2) if not osp.is_text_present("飞信电话"): raise AssertionError("搜索失败")
def test_ZZJG_0021(self): """搜索不存在的成员电话(最少输入电话号码前6位)""" # 1、点击“组织架构”应用 # 2、搜索不存在成员电话号码(最少输入电话号码前6位) osp = OrganizationStructurePage() time.sleep(2) osp.wait_for_page_load() osp.input_search_box("111111") time.sleep(3) if not osp.is_text_present("暂无成员"): raise AssertionError("搜索失败")
def test_ZZJG_0020(self): """搜索不经存在的成员姓名""" # 1、点击“组织架构”应用 # 2、搜索不存在成员姓名 osp = OrganizationStructurePage() time.sleep(2) osp.wait_for_page_load() osp.click_text("搜索") osp.input_search_box("不存在") time.sleep(3) if not osp.is_text_present("未搜索到相关结果"): raise AssertionError("搜索失败")
def test_ZZJG_0019(self): """搜索已经存在的成员电话(最少输入电话号码前6位)""" # 1、点击“组织架构”应用 # 2、搜索已存在成员电话号码(最少输入电话号码前6位) osp = OrganizationStructurePage() time.sleep(2) osp.wait_for_page_load() number = current_mobile().get_cards(CardType.CHINA_MOBILE)[0] osp.input_search_box(number[0:6]) time.sleep(3) if not osp.is_text_present(number): raise AssertionError("搜索失败")