Exemplo n.º 1
0
 def test_me_zhangshuli_042(self):
     """“编辑资料” 头像设置-修改头像未保存退出编辑-取消"""
     # 0.检验是否跳转到我页面,点击进入查看并编辑资料
     mep = MePage()
     self.assertEquals(mep.is_on_this_page(), True)
     mep.click_view_edit()
     mup = MeViewUserProfilePage()
     self.assertTrue(mup.is_on_this_page())
     mup.click_edit()
     me_edit = MeEditUserProfilePage()
     time.sleep(1)
     self.assertTrue(me_edit.is_on_this_page())
     #选择一张图片修改头像
     me_edit.click_take_photo_icon()
     me_edit.click_select_one_picture()
     time.sleep(1)
     me_edit.select_first_picture()
     time.sleep(1)
     me_edit.click_save_picture()
     time.sleep(2)
     me_edit.element_should_contain(text='拍照图标')
     #编辑资料页面,点击返回
     me_edit.click_back()
     me_edit.page_should_contain_text('当前资料已修改,是否保存')
     me_edit.click_cancel_mod()
     time.sleep(2)
     self.assertTrue(mup.is_on_this_page())
Exemplo n.º 2
0
 def test_me_zhangshuli_024(self):
     """分享名片-未知号码搜索"""
     # 0.检验是否跳转到我页面,点击进入查看并编辑资料
     mep = MePage()
     self.assertEquals(mep.is_on_this_page(), True)
     mep.click_view_edit()
     mup = MeViewUserProfilePage()
     time.sleep(2)
     # 1.点击分享名片
     mup.page_up()
     mup.click_share_card()
     scp = SelectContactsPage()
     scp.wait_for_page_load()
     time.sleep(2)
     # 2.点击搜索框进行搜索 -页面展示
     scp.click_search_contact()
     scp.input_search_keyword('13128799346')
     time.sleep(2)
     scp.page_down()
     scp.check_if_element_exist(text='搜索团队联系人入口')
     scp.check_if_element_exist(text='网络搜索结果')
     #分享联系人成功
     scp.click_element_by_id(text='网络搜索结果')
     time.sleep(2)
     scp.click_share_card()
     time.sleep(2)
     self.assertTrue(mup.is_on_this_page())
Exemplo n.º 3
0
    def test_me_zhangshuli_017(self):
        """分享名片-选择手机联系人-通过姓名关键字或者手机号码搜索在手机通讯录中的联系人(非自己)"""
        # 0.检验是否跳转到我页面,点击进入查看并编辑资料
        mep = MePage()
        self.assertEquals(mep.is_on_this_page(), True)
        mep.click_view_edit()
        mup = MeViewUserProfilePage()
        time.sleep(2)
        # 1.点击分享名片
        mup.page_up()
        mup.click_share_card()
        scp = SelectContactsPage()
        scp.wait_for_page_load()
        time.sleep(2)
        # 2.点击选择一个手机联系人-分享名片
        scp.click_phone_contact()
        time.sleep(2)
        slp = SelectLocalContactsPage()
        slp.click_search_box()
        slp.input_search_keyword('大佬1')
        slp.click_search_result()
        time.sleep(2)
        # 点击弹框右上角的取消按钮

        # 分享名片
        slp.click_share_card()
        time.sleep(2)
        self.assertTrue(mup.is_on_this_page())
        time.sleep(2)
Exemplo n.º 4
0
    def test_me_zhangshuli_016(self):
        """分享名片-选择手机联系人-选择任意联系人(非自己)"""
        # 0.检验是否跳转到我页面,点击进入查看并编辑资料
        mep = MePage()
        self.assertEquals(mep.is_on_this_page(), True)
        mep.click_view_edit()
        mup = MeViewUserProfilePage()
        time.sleep(2)
        # 1.点击分享名片
        mup.page_up()
        mup.click_share_card()
        scp = SelectContactsPage()
        scp.wait_for_page_load()
        time.sleep(2)
        # 2.点击选择一个手机联系人-分享名片
        scp.click_phone_contact()
        time.sleep(2)
        slp = SelectLocalContactsPage()
        slp.swipe_select_one_member_by_name('大佬1')
        time.sleep(2)
        # 点击弹框右上角的取消按钮

        # 分享名片
        slp.click_share_card()
        time.sleep(2)
        self.assertTrue(mup.is_on_this_page())
        time.sleep(2)
Exemplo n.º 5
0
 def test_me_zhangshuli_049(self):
     """“““编辑资料” 职位栏输入超长字符"""
     # 0.检验是否跳转到我页面,点击进入查看并编辑资料
     mep = MePage()
     self.assertEquals(mep.is_on_this_page(), True)
     mep.click_view_edit()
     mup = MeViewUserProfilePage()
     self.assertTrue(mup.is_on_this_page())
     mup.click_edit()
     me_edit = MeEditUserProfilePage()
     time.sleep(1)
     self.assertTrue(me_edit.is_on_this_page())
     # 职位栏输入超长字符
     me_edit.page_up()
     text = '职员' * 30
     me_edit.input_position(text)
     me_edit.click_save()
     self.assertTrue(me_edit.is_on_this_page())
Exemplo n.º 6
0
 def test_me_zhangshuli_022(self):
     """分享名片-输入手机号码搜索"""
     # 0.检验是否跳转到我页面,点击进入查看并编辑资料
     mep = MePage()
     self.assertEquals(mep.is_on_this_page(), True)
     mep.click_view_edit()
     mup = MeViewUserProfilePage()
     time.sleep(2)
     # 1.点击分享名片
     mup.page_up()
     mup.click_share_card()
     scp = SelectContactsPage()
     scp.wait_for_page_load()
     time.sleep(2)
     # 2.有搜索结果时 -页面展示
     scp.click_search_contact()
     scp.input_search_keyword('13800138005')
     time.sleep(2)
     scp.page_down()
     scp.check_if_element_exist(text='搜索团队联系人入口')
     scp.check_if_element_exist(text='搜索结果列表1')
     # 分享名片
     scp.click_element_by_id(text='搜索结果列表1')
     scp.click_share_card()
     time.sleep(2)
     self.assertTrue(mup.is_on_this_page())
     time.sleep(2)
     # 无搜索结果时,仅展示团队联系人入口
     mup.page_up()
     mup.click_share_card()
     scp = SelectContactsPage()
     scp.wait_for_page_load()
     time.sleep(2)
     scp.click_search_contact()
     scp.input_search_keyword('11223344556')
     time.sleep(2)
     scp.page_down()
     scp.check_if_element_exist(text='搜索团队联系人入口')
     scp.check_if_element_not_exist(text='搜索结果列表1')
Exemplo n.º 7
0
    def test_me_zhangshuli_020(self):
        """分享名片-选择最近聊天联系人"""
        # 0.检验是否跳转到我页面,点击进入查看并编辑资料
        mep = MePage()
        self.assertEquals(mep.is_on_this_page(), True)
        mep.click_view_edit()
        mup = MeViewUserProfilePage()
        time.sleep(2)
        # 1.点击分享名片
        mup.page_up()
        mup.click_share_card()
        scp = SelectContactsPage()
        scp.wait_for_page_load()
        time.sleep(2)
        # 2.点击选择一个最近聊天-分享名片
        scp.click_recent_chat_contact()
        time.sleep(2)
        # 点击弹框右上角的取消按钮

        # 分享名片
        scp.click_share_card()
        time.sleep(2)
        self.assertTrue(mup.is_on_this_page())
        time.sleep(2)