Пример #1
0
 def test_member_0046(self):
     """
         1、正常登陆
         2、网络正常
         3、当前页面为家庭网成员页面
         4、已开通家庭网业务"	点击"添加成员"按钮	"(1)输入手机号码:输入框文字引导用户输入11位中国移动号码。输入框只能输入数字。
     """
     contact_page = ContactsPage()
     # 确保在通讯录界面
     self.assertEqual(
         contact_page.is_element_already_exist_c('通讯录_标题',
                                                 default_timeout=20), True)
     # 展开家庭网
     if not contact_page.if_home_net_expand():
         contact_page.click_locator_key_c('家庭网_展开_收起')
         time.sleep(1)
     # 点击家庭网第一个联系人
     contact_page.click_locator_key_c('家庭网_管理')
     time.sleep(1)
     contact_page.click_locator_key_c('家庭网_添加成员')
     time.sleep(1)
     contact_page.click_locator_key_c('家庭网_通讯录')
     time.sleep(0.5)
     self.assertEqual(contact_page.is_text_present_c('选择号码'), True)
     contact_page.input_text_c('家庭网_通讯录_搜索框', '13800138001')
     time.sleep(0.5)
     self.assertEqual(
         contact_page.get_elements_count_c('家庭网_通讯录_号码') > 0, True)
Пример #2
0
 def test_member_0016(self):
     """
         1、联网正常
         2、已登陆客户端
         3、在通讯录-不限时长详情页面
         点击不限时长成员头像	弹出拨打电话提示
     """
     contact_page = ContactsPage()
     # 确保在通讯录界面
     self.assertEqual(contact_page.is_element_already_exist_c('通讯录_标题'),
                      True)
     time.sleep(2)
     self.assertEqual(
         contact_page.get_elements_count_c('不限时长_联系人组') > 0, True)
     contact_page.get_elements_list_c('不限时长_联系人组')[0].click()
     time.sleep(1)
     if contact_page.is_element_already_exist_c('回呼_提示文本'):
         contact_page.click_locator_key_c('回呼_我知道了')
     n = 20
     flag = False
     while n > 0:
         if (contact_page.is_text_present_c('飞信电话', default_timeout=0.1)
             and contact_page.is_text_present_c('12560', default_timeout=0.1)) \
                 or contact_page.is_text_present_c('对方已振铃', default_timeout=0.1):
             flag = True
             break
         n -= 1
     try:
         self.assertEqual(flag, True)
     finally:
         try:
             contact_page.hang_up_the_call()
         except Exception:
             pass
Пример #3
0
 def test_member_00145(self):
     """
         1、已登录密友圈
         2、网络正常
         3、当前页面添加不限时长成员页面"	查看页面数据显示
         1、存在不限时长、家庭网、本地通讯录、好友成员数据,去重显示
     """
     contact_page = ContactsPage()
     # 确保在通讯录界面
     self.assertEqual(
         contact_page.is_element_already_exist_c('通讯录_标题',
                                                 default_timeout=20), True)
     els = contact_page.get_elements_list_c('不限时长_昵称')
     n = 5
     while n > 0:
         for el in els:
             if '添加' == el.text:
                 el.click()
                 break
         else:
             n -= 1
             print(n)
             contact_page.press_and_move_to_left(els[-2])
             continue
         break
     time.sleep(1)
     self.assertEqual(
         contact_page.get_elements_count_c('不限时长_添加联系人') > 0, True)
Пример #4
0
 def test_member_00146(self):
     """
         1、已登录密友圈
         2、网络正常
         3、当前页面添加不限时长成员页面"	查看页面数据显示
         1、存在不限时长、家庭网、本地通讯录、好友成员数据,去重显示
     """
     contact_page = ContactsPage()
     # 确保在通讯录界面
     self.assertEqual(
         contact_page.is_element_already_exist_c('通讯录_标题',
                                                 default_timeout=20), True)
     self.assertEqual(contact_page.get_elements_count_c('联系人号码') > 0, True)
Пример #5
0
 def test_member_0036(self):
     """
         家庭网用户非首次登陆APP,密友圈模块显示情况
         1.已登录APP
         2.网络正常"	1.点击通讯录模块	1.家庭网成员正常加载
     """
     contact_page = ContactsPage()
     # 确保在通讯录界面
     self.assertEqual(contact_page.is_element_already_exist_c('通讯录_标题'),
                      True)
     # 展开家庭网
     if not contact_page.if_home_net_expand():
         contact_page.click_locator_key_c('家庭网_展开_收起')
         time.sleep(1)
     # 点击家庭网第一个联系人
     self.assertEqual(contact_page.get_elements_count_c('联系人号码') > 0, True)
Пример #6
0
 def test_member_00118(self):
     """
         1、联网正常
         2、已登陆客户端
         3、当前通讯录页面"	1、在搜索框中输入“13xx”
         1、分别展示符合内容的家庭网用户、密友用户
     """
     contact_page = ContactsPage()
     # 确保在通讯录界面
     self.assertEqual(
         contact_page.is_element_already_exist_c('通讯录_标题',
                                                 default_timeout=20), True)
     contact_page.click_locator_key_c('搜索')
     time.sleep(0.5)
     contact_page.input_text_c('搜索_搜索框', '138')
     time.sleep(0.8)
     self.assertEqual(
         contact_page.get_elements_count_c('搜索_联系人号码') > 0, True)
Пример #7
0
 def test_member_0107_01(self):
     """
         1、查看密友圈(不限时长)
         2、点击成员电话icon
         3、点击“管理”
         1、列表为横向可滑动显示查看:成员半透明底头像+电话icon,底部为不限时长联系人名称(名称显示优先级:备注名(存在服务端)>个人中心昵称>本地通讯录>家庭网名>短号);
         2、点击icon发起电话流程(回拨或者CS电话),打电话逻辑不变;
         3、进入不限时长成员管理页面,成员管理页面、添加成员页面以及功能逻辑与现网标准版一致;"
     """
     contact_page = ContactsPage()
     # 确保在通讯录界面
     self.assertEqual(contact_page.is_element_already_exist_c('通讯录_标题'),
                      True)
     time.sleep(2)
     self.assertEqual(
         contact_page.get_elements_count_c('不限时长_联系人组') > 0, True)
     contact_page.get_elements_list_c('不限时长_联系人组')[0].click()
     time.sleep(1)
     if contact_page.is_element_already_exist_c('回呼_提示文本'):
         contact_page.click_locator_key_c('回呼_我知道了')
     n = 20
     flag = False
     while n > 0:
         if (contact_page.is_text_present_c('飞信电话', default_timeout=0.1)
             and contact_page.is_text_present_c('12560', default_timeout=0.1)) \
                 or contact_page.is_text_present_c('对方已振铃', default_timeout=0.1):
             flag = True
             break
         n -= 1
     try:
         self.assertEqual(flag, True)
     finally:
         try:
             contact_page.hang_up_the_call()
         except Exception:
             pass