def test_member_008(self): """ 1、联网正常 2、已登陆客户端 3、在家庭网详情-编辑资料页面 输入html标签并点击保存 保存成功 """ 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) # 点击家庭网第一个联系人 contact_page.get_elements_list_c('联系人号码')[0].click() time.sleep(3) # 修改备注 contact_page.click_locator_key_c('联系人_备注修改') self.assertEqual(contact_page.is_text_present_c('修改备注名'), True) # 清空输入框内容 contact_page.edit_clear_c('编辑备注_输入框') name = "<a href='baidu.com'>aa</a>" contact_page.input_text_c('编辑备注_输入框', name) contact_page.click_locator_key_c('编辑备注_保存') contact_page.is_toast_exist('备注失败,请重新输入', timeout=5)
def test_member_0071(self): """ 当月已解绑过一名成员后再次解绑第二名成员 "1、非四川移动用户已登录APP; 2、网络正常; 3、当前在不限时长成员管理;" 长按要解绑的不限时长成员 "解绑达上限,则toast提示“本月解绑人数已达上限” """ contact_page = ContactsPage() # 确保在通讯录界面 self.assertEqual( contact_page.is_element_already_exist_c('通讯录_标题', default_timeout=20), True) # 密友圈没有成员 if not contact_page.if_meet_net_expand(): raise RuntimeError('密友圈没有成员') # 点击管理 contact_page.get_elements_list_c('密友圈_管理')[0].click() time.sleep(1) contact_page.press(contact_page.get_elements_list_c('密友圈_管理_成员')[0]) time.sleep(0.5) contact_page.click_text('解绑') time.sleep(0.5) contact_page.click_locator_key_c('密友圈_解绑_确定') time.sleep(1) if not contact_page.if_meet_net_expand(): raise RuntimeError('密友圈没有成员') # 点击管理 contact_page.press(contact_page.get_elements_list_c('密友圈_管理_成员')[0]) time.sleep(0.5) contact_page.click_text('解绑') time.sleep(0.5) contact_page.click_locator_key_c('密友圈_解绑_确定') time.sleep(1) self.assertEqual(contact_page.is_toast_exist('解绑人数已达本月上限'), True)