How to use delete_group method in localstack

Best Python code snippet using localstack_python

tags_grouping.py

Source:tags_grouping.py Github

copy

Full Screen

...263 def test_contacts_quxinli_0372(self):264 """联系人选择器页面"""265 glp = GroupListPage()266 time.sleep(1)267 glp.delete_group(name='aaa')268 glp.new_group()269 glp.click_text('aaa')270 time.sleep(1)271 glp.click_text('添加成员')272 time.sleep(2)273 glp.page_should_contain_text('搜索或输入号码')274 glp.page_should_contain_text('选择联系人')275 glp.page_should_contain_text('确定')276 glp.click_back_button(times=2)277 glp.delete_group(name='aaa')278 @tags('ALL', 'SMOKE', 'CMCC')279 def test_contacts_quxinli_0390(self):280 """群发信息"""281 glp = GroupListPage()282 time.sleep(1)283 glp.delete_group(name='aaa')284 glp.new_group(name='aaa')285 # 添加小组成员286 glp.click_text('aaa')287 time.sleep(1)288 LabelGroupingChatPage().click_text('添加成员')289 slcp = SelectLocalContactsPage()290 time.sleep(2)291 slcp.swipe_select_one_member_by_name('大佬1')292 slcp.click_sure()293 time.sleep(2)294 # 发送长文本消息295 message = str('aa aa' * 20)296 glp.send_message_to_group([message])297 time.sleep(5)298 glp.page_contain_element('已转短信送达')299 # 发送纯文本300 glp.click_back_by_android(2)301 time.sleep(1)302 message = 'aaaa'303 glp.send_message_to_group(message)304 time.sleep(5)305 glp.page_contain_element('已转短信送达')306 # 发送文本 空格307 glp.click_back_by_android(2)308 time.sleep(1)309 message = 'aa aa'310 glp.send_message_to_group(message)311 time.sleep(5)312 glp.page_contain_element('已转短信送达')313 # 发送表情314 glp.click_back_by_android(2)315 time.sleep(1)316 glp.send_express_to_group()317 time.sleep(1)318 glp.page_not_contain_element('发送失败')319 # 发送图片320 glp.click_back_by_android()321 time.sleep(1)322 glp.send_picture_to_group()323 time.sleep(1)324 glp.page_not_contain_element('发送失败')325 time.sleep(1)326 glp = GroupListPage()327 glp.click_back_by_android(times=2)328 glp.delete_group(name='aaa')329 @tags('ALL', 'SMOKE', 'CMCC')330 def test_contacts_quxinli_0397(self):331 """多方电话"""332 glp = GroupListPage()333 cdp = ContactDetailsPage()334 time.sleep(2)335 glp.delete_group(name='aaa')336 glp.new_group(name='aaa')337 # 进入群组,添加联系人338 glp.click_text('aaa')339 time.sleep(1)340 glp.tap_sure_box()341 time.sleep(1)342 glp.click_text('添加成员')343 time.sleep(2)344 slcp = SelectLocalContactsPage()345 slcp.swipe_select_one_member_by_name('大佬1')346 slcp.swipe_select_one_member_by_name('大佬3')347 slcp.click_sure()348 time.sleep(2)349 # 多方通话350 glp.enter_mutil_call()351 time.sleep(1)352 glp.click_text("大佬1")353 time.sleep(1)354 cdp.send_call_number()355 time.sleep(1)356 if glp.is_text_present('我知道了'):357 time.sleep(2)358 glp.click_text('我知道了')359 if glp.is_text_present('发起多方电话失败'):360 pass361 else:362 cdp.cancel_permission()363 time.sleep(2)364 cdp.cancel_hefeixin_call()365 time.sleep(2)366 @tags('ALL', 'SMOKE', 'CMCC')367 def test_contacts_quxinli_0398(self):368 """多方视频"""369 GroupPage = GroupListPage()370 cdp = ContactDetailsPage()371 # preconditions.launch_app()372 time.sleep(2)373 GroupPage.delete_group(name='aaa')374 GroupPage.new_group(name='aaa')375 # 添加成员376 GroupPage.click_text('aaa')377 GroupPage.tap_sure_box()378 LabelGroupingChatPage().click_text('添加成员')379 slcp = SelectLocalContactsPage()380 time.sleep(1)381 slcp.swipe_select_one_member_by_name('大佬1')382 time.sleep(1)383 slcp.click_sure()384 time.sleep(1)385 # 点击多方视频386 GroupPage.enter_mutil_video_call()387 while GroupPage.is_text_present('始终允许'):388 GroupPage.click_text('始终允许')389 # if GroupPage.is_text_present('相机权限'):390 # GroupPage.click_text('始终允许')391 time.sleep(1)392 GroupPage.click_text("大佬1")393 time.sleep(2)394 cdp.send_call_number()395 if cdp.is_text_present('暂不开启'):396 cdp.cancel_permission()397 cdp.end_video_call()398 GroupPage = GroupListPage()399 time.sleep(1)400 SelectOneGroupPage().click_back_by_android()401 time.sleep(1)402 GroupPage.delete_group(name='aaa')403 @tags('ALL', 'SMOKE', 'CMCC')404 def test_contacts_quxinli_0403(self):405 """修改标签名称"""406 GroupPage = GroupListPage()407 time.sleep(1)408 GroupPage.delete_group(name='aaa')409 GroupPage.new_group(name='aaa')410 GroupPage.click_text('aaa')411 GroupPage.tap_sure_box()412 GroupPage.click_settings_button()413 GroupPage.update_label_name(name='bbb')414 GroupPage.click_back_button(times=2)415 GroupPage.page_should_contain_text(text='bbb')416 GroupPage = GroupListPage()417 # GroupPage.click_back_button(times=2)418 GroupPage.delete_group(name='aaa')419 @tags('ALL', 'SMOKE', 'CMCC')420 def test_contacts_quxinli_0411(self):421 """移除成员"""422 GroupPage = GroupListPage()423 # cdp = ContactDetailsPage()424 time.sleep(1)425 GroupPage.delete_group(name='aaa')426 GroupPage.new_group(name='aaa')427 # 添加联系人428 time.sleep(2)429 GroupPage.click_text('aaa')430 time.sleep(1)431 LabelGroupingChatPage().click_text('添加成员')432 slcp = SelectLocalContactsPage()433 slcp.swipe_select_one_member_by_name('大佬3')434 time.sleep(1)435 slcp.swipe_select_one_member_by_name('大佬4')436 slcp.click_sure()437 time.sleep(2)438 #移除成员439 GroupPage.click_settings_button()440 GroupPage.click_move_label()441 GroupPage.click_text('大佬3')442 time.sleep(1)443 GroupPage.click_sure_element()444 time.sleep(1)445 GroupPage.click_move_label()446 time.sleep(1)447 GroupPage.page_should_not_contain_text("大佬3")448 GroupPage = GroupListPage()449 GroupPage.click_back_button(times=3)450 GroupPage.delete_group(name='aaa')451 @tags('ALL', 'SMOKE', 'CMCC')452 def test_contacts_quxinli_0415(self):453 """删除标签"""454 GroupPage = GroupListPage()455 time.sleep(1)456 LabelGroupingPage().delete_all_label()457 time.sleep(2)458 GroupPage.new_group(name='ccc')459 GroupPage.delete_group(name='ccc')460 GroupPage.click_back_by_android(times=2)461 GroupPage.page_should_not_contain_text('ccc')462class Tag_Group(TestCase):463 """联系 - 标签、新建分组"""464 @classmethod465 def setUpClass(cls):466 Preconditions.select_mobile('Android-移动')467 current_mobile().hide_keyboard_if_display()468 Preconditions.make_already_in_message_page()469 mess = MessagePage()470 if mess.is_on_this_page():471 WorkbenchPreconditions.enter_create_team_page2()472 # 当前为消息页面473 # 确保存在子部门474 WorkbenchPreconditions.create_sub_department()475 # 导入测试联系人476 fail_time1 = 0477 flag1 = False478 import dataproviders479 while fail_time1 < 2:480 try:481 required_contacts = dataproviders.get_preset_contacts()482 conts = ContactsPage()483 conts.open_contacts_page()484 if conts.is_text_present("发现SIM卡联系人"):485 conts.click_text("显示")486 for name, number in required_contacts:487 # 创建联系人488 conts.create_contacts_if_not_exits_new(name, number)489 flag1 = True490 except:491 fail_time1 += 1492 if flag1:493 break494 def default_setUp(self):495 Preconditions.select_mobile('Android-移动')496 Preconditions.enter_label_grouping_chat_page()497 @tags('ALL', 'SMOKE', 'CMCC')498 def test_contacts_quxinli_0352(self):499 """未添加分组"""500 lg = LabelGroupingPage()501 lg.wait_for_page_load()502 lg.delete_all_label()503 lg.assert_default_status_is_right()504 lg.wait_for_page_load()505 lg.click_back_by_android(2)506 conts_page = ContactsPage()507 conts_page.open_message_page()508 @tags('ALL', 'CONTACT', 'CMCC')509 def test_contacts_quxinli_0353(self):510 """新建分组"""511 glp = GroupListPage()512 glp.click_new_group()513 time.sleep(1)514 glp.check_if_contains_element('为你的分组创建一个名称')515 glp.check_if_contains_element('请输入标签分组名称')516 glp.check_if_contains_element('标题新建分组')517 glp.check_if_contains_element()518 @tags('ALL', 'CONTACT', 'CMCC')519 def test_contacts_quxinli_0354(self):520 """新建分组,标签分组名称为空"""521 GroupPage=GroupListPage()522 GroupPage.click_new_group()523 GroupPage.click_sure_element()524 time.sleep(3)525 GroupPage.check_if_contains_element()526 GroupPage.sure_icon_is_checkable()527 @tags('ALL', 'CONTACT', 'CMCC')528 def test_contacts_quxinli_0355(self):529 """新建分组,标签分组名称输入空格"""530 GroupPage = GroupListPage()531 GroupPage.click_new_group()532 GroupPage.click_input_element()533 time.sleep(3)534 GroupPage.input_content(text=' ')535 time.sleep(2)536 GroupPage.check_if_contains_element()537 GroupPage.sure_icon_is_checkable()538 @tags('ALL', 'CONTACT', 'CMCC')539 def test_contacts_quxinli_0356(self):540 """新建分组,标签分组名称输入9个汉字"""541 GroupPage = GroupListPage()542 GroupPage.delete_group(name='祝一路顺风幸福美满')543 GroupPage.click_new_group()544 GroupPage.click_input_element()545 time.sleep(1)546 GroupPage.input_content(text='祝一路顺风幸福美满')547 GroupPage.click_sure_element()548 time.sleep(2)549 GroupPage.click_allow_button()550 GroupPage.page_should_contain_text('选择联系人')551 def tearDown_test_contacts_quxinli_0356(self):552 Preconditions.enter_label_grouping_chat_page()553 GroupPage = GroupListPage()554 GroupPage.delete_group(name='祝一路顺风幸福美满')555 @tags('ALL', 'CONTACT', 'CMCC')556 def test_contacts_quxinli_0357(self):557 """新建分组,标签分组名称输入10个汉字"""558 GroupPage = GroupListPage()559 GroupPage.click_new_group()560 GroupPage.click_input_element()561 time.sleep(3)562 GroupPage.input_content(text="祝一路顺风和幸福美满")563 GroupPage.click_sure_element()564 GroupPage.click_allow_button()565 GroupPage.page_should_contain_text('选择联系人')566 def tearDown_test_contacts_quxinli_0357(self):567 GroupPage = GroupListPage()568 GroupPage.click_back_button(times=2)569 GroupPage.delete_group(name='祝一路顺风和幸福美满')570 @tags('ALL', 'CONTACT', 'CMCC')571 def test_contacts_quxinli_0358(self):572 """新建分组,标签分组名称输入11个汉字"""573 GroupPage = GroupListPage()574 GroupPage.click_new_group()575 GroupPage.click_input_element()576 time.sleep(3)577 text="祝一路顺风和幸福美满啊"578 GroupPage.input_content(text)579 time.sleep(1)580 name=GroupPage.get_text_of_lablegrouping_name()581 self.assertNotEqual(text,name)582 self.assertTrue(len(name) == 10)583 #删除标签分组584 time.sleep(1)585 LabelGroupingPage().click_back()586 @tags('ALL', 'CONTACT', 'CMCC')587 def test_contacts_quxinli_0359(self):588 """新建分组,标签分组名称输入29个数字"""589 GroupPage = GroupListPage()590 time.sleep(1)591 GroupPage.click_new_group()592 GroupPage.click_input_element()593 time.sleep(1)594 self.message='1'*29595 GroupPage.input_content(text=self.message)596 time.sleep(1)597 GroupPage.click_sure_element()598 GroupPage.click_allow_button()599 time.sleep(1)600 GroupPage.page_should_contain_text('选择联系人')601 GroupPage.click_back_button(times=2)602 def tearDown_test_contacts_quxinli_0359(self):603 GroupPage = GroupListPage()604 time.sleep(1)605 GroupPage.delete_group(name=self.message)606 @tags('ALL', 'CONTACT', 'CMCC')607 def test_contacts_quxinli_0369(self):608 """新建分组,已添加分组后标签分组列表展示"""609 GroupPage = GroupListPage()610 time.sleep(1)611 lg = LabelGroupingPage()612 lg.wait_for_page_load()613 lg.delete_all_label()614 GroupPage.new_group(name='aaa')615 GroupPage.new_group(name='bbb')616 y0=GroupPage.get_element_text_y()617 y1=GroupPage.get_element_text_y(text='aaa')618 y2=GroupPage.get_element_text_y(text='bbb')619 self.assertTrue(y0<y1<y2)620 def tearDown_test_contacts_quxinli_0369(self):621 GroupPage = GroupListPage()622 time.sleep(2)623 GroupPage.delete_group(name='aaa')624 time.sleep(1)625 GroupPage.delete_group(name='bbb')626 @tags('ALL', 'CONTACT', 'CMCC')627 def test_contacts_quxinli_0370(self):628 """点击分组列表无成员的分组"""629 GroupPage = GroupListPage()630 time.sleep(1)631 lg = LabelGroupingPage()632 lg.wait_for_page_load()633 lg.delete_all_label()634 GroupPage.new_group()635 #点击该分组636 GroupPage.click_text('aaa')637 time.sleep(2)638 GroupPage.page_should_contain_text('我知道了')639 GroupPage.page_should_contain_text('添加成员')640 #点击我知道了641 GroupPage.click_text('我知道了')642 GroupPage.page_should_not_contain_text('我知道了')643 #点击添加成员644 GroupPage.click_back_button()645 time.sleep(2)646 GroupPage.click_text('aaa')647 time.sleep(1)648 GroupPage.click_text('添加成员')649 time.sleep(2)650 GroupPage.page_should_contain_text('选择联系人')651 def tearDown_test_contacts_quxinli_0370(self):652 GroupPage = GroupListPage()653 GroupPage.click_back_button(times=2)654 GroupPage.delete_group(name='aaa')655 @tags('ALL', 'CONTACT', 'CMCC')656 def test_contacts_quxinli_0371(self):657 """新建分组,分组详情操作界面"""658 GroupPage = GroupListPage()659 time.sleep(1)660 GroupPage.delete_group(name='aaa')661 GroupPage.new_group()662 time.sleep(1)663 GroupPage.click_text('aaa')664 time.sleep(2)665 GroupPage.click_text('知道了')666 time.sleep(1)667 GroupPage.page_contain_element()668 GroupPage.page_contain_element('群发信息')669 GroupPage.page_contain_element('多方电话')670 GroupPage.page_contain_element('多方视频')671 GroupPage.page_contain_element('设置')672 GroupPage.page_contain_element('aaa')673 def tearDown_test_contacts_quxinli_0371(self):674 GroupPage = GroupListPage()675 GroupPage.click_back_button()676 GroupPage.delete_group(name='aaa')677 @tags('ALL', 'CONTACT', 'CMCC')678 def test_contacts_quxinli_0372(self):679 """新建分组,标签分组添加成员页面"""680 glp = GroupListPage()681 time.sleep(1)682 glp.delete_group(name='aaa')683 glp.new_group()684 glp.click_text('aaa')685 time.sleep(1)686 glp.click_text('添加成员')687 time.sleep(2)688 glp.page_should_contain_text('搜索或输入号码')689 glp.page_should_contain_text('选择联系人')690 glp.page_should_contain_text('确定')691 SelectContactsPage().sure_icon_is_checkable()692 glp.check_if_contains_element(text='联系人列表')693 def tearDown_test_contacts_quxinli_0372(self):694 glp = GroupListPage()695 glp.click_back_by_android()696 glp.delete_group(name='aaa')697 @tags('ALL', 'CONTACT', 'CMCC')698 def test_contacts_quxinli_0373(self):699 """标签分组添加成员-搜索结果页面"""700 GroupPage = GroupListPage()701 time.sleep(1)702 GroupPage.delete_group(name='aaa')703 GroupPage.new_group(name='aaa')704 GroupPage.click_text('aaa')705 time.sleep(1)706 GroupPage.click_text('添加成员')707 time.sleep(1)708 GroupPage.click_search_box()709 time.sleep(1)710 GroupPage.input_search_text(text='测试')711 GroupPage.hide_keyboard()712 time.sleep(1)713 GroupPage.page_contain_element(locator='搜索框-搜索结果')714 #删除搜索文本715 GroupPage.page_should_contain_element1(locator="删除-搜索")716 GroupPage.clear_input_box()717 time.sleep(1)718 GroupPage.is_element_present()719 #再次输入内容搜索720 GroupPage.input_search_text(text='测试')721 GroupPage.hide_keyboard()722 time.sleep(1)723 GroupPage.page_contain_element(locator='搜索框-搜索结果')724 GroupPage.click_text('测试号码1')725 time.sleep(2)726 GroupPage.hide_keyboard()727 #跳转成功728 GroupPage.page_should_contain_text('搜索或输入号码')729 GroupPage.page_should_contain_text('选择联系人')730 #点击搜索结果731 SelectLocalContactsPage().swipe_select_one_member_by_name('测试号码1')732 GroupPage.is_element_present(locator='已选择的联系人')733 def tearDown_test_contacts_quxinli_0373(self):734 GroupPage = GroupListPage()735 GroupPage.click_back_button(times=2)736 GroupPage.delete_group(name='aaa')737 @tags('ALL', 'CONTACT', 'CMCC')738 def test_contacts_quxinli_0374(self):739 """标签分组添加成员-搜索陌生号码"""740 glp = GroupListPage()741 time.sleep(1)742 glp.delete_group(name='aaa')743 glp.new_group(name='aaa')744 glp.click_text('aaa')745 time.sleep(1)746 glp.click_text('添加成员')747 time.sleep(1)748 glp.click_search_box()749 time.sleep(1)750 glp.input_search_text(text='13800138005')751 glp.hide_keyboard()752 time.sleep(1)753 glp.page_should_contain_text('选择联系人')754 glp.is_element_present(locator='联系人头像')755 def tearDown_test_contacts_quxinli_0374(self):756 glp = GroupListPage()757 glp.click_back_by_android(2)758 glp.delete_group(name='aaa')759 @tags('ALL', 'CONTACT', 'CMCC')760 def test_contacts_quxinli_0375(self):761 """标签分组添加成员-选择本地联系人"""762 GroupPage = GroupListPage()763 time.sleep(1)764 GroupPage.delete_group(name='aaa')765 GroupPage.new_group(name='aaa')766 GroupPage.click_text('aaa')767 time.sleep(1)768 LabelGroupingChatPage().click_text('添加成员')769 slcp = SelectLocalContactsPage()770 slcp.swipe_select_one_member_by_name('大佬1')771 GroupPage.is_element_present(locator='已选择的联系人')772 GroupPage.sure_icon_is_checkable()773 #再次点击已选择的联系人774 slcp.swipe_select_one_member_by_name('大佬1')775 GroupPage.is_element_present(locator='已选择的联系人')776 #点击已选择联系人的头像,取消选择777 slcp.swipe_select_one_member_by_name('大佬1')778 GroupPage.click_selected_contacts()779 GroupPage.is_element_present(locator='已选择的联系人')780 #选择人员,添加成员成功781 slcp.swipe_select_one_member_by_name('大佬1')782 slcp.click_sure()783 time.sleep(1)784 def tearDown_test_contacts_quxinli_0375(self):785 GroupPage = GroupListPage()786 GroupPage.click_back_button()787 GroupPage.delete_group(name='aaa')788 @staticmethod789 def setUp_test_contacts_quxinli_0376():790 Preconditions.select_mobile('Android-移动')791 current_mobile().hide_keyboard_if_display()792 Preconditions.init_and_enter_contacts_page()793 if ContactsPage().is_text_present('需要使用通讯录权限'):794 ContactsPage().click_always_allowed()795 time.sleep(2)796 ContactsPage().click_search_box()797 time.sleep(2)798 ContactListSearchPage().input_search_keyword('本机')799 time.sleep(1)800 if ContactListSearchPage().is_contact_in_list('本机'):801 ContactListSearchPage().click_back_by_android()802 else:803 # 创建联系人 本机804 ContactListSearchPage().click_back_by_android()805 # 进入手机联系人页面806 ContactsPage().click_mobile_contacts()807 ContactsPage().click_add()808 creat_contact2 = CreateContactPage()809 creat_contact2.click_input_name()810 creat_contact2.input_name('本机')811 creat_contact2.click_input_number()812 phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)813 creat_contact2.input_number(phone_number[0])814 creat_contact2.save_contact()815 time.sleep(1)816 ContactDetailsPage().click_back_by_android(2)817 Preconditions.enter_label_grouping_chat_page()818 @tags('ALL', 'CONTACT', 'CMCC')819 def test_contacts_quxinli_0376(self):820 """标签分组添加成员-选择本地联系人不可选成员"""821 glp = GroupListPage()822 glp.delete_group(name='aaa')823 glp.new_group(name='aaa')824 glp.click_text('aaa')825 time.sleep(1)826 LabelGroupingChatPage().click_text('添加成员')827 slcp = SelectLocalContactsPage()828 slcp.swipe_select_one_member_by_name('本机')829 slcp.page_should_contain_text('该联系人不可选择')830 def tearDown_test_contacts_quxinli_0376(self):831 glp = GroupListPage()832 glp.click_back_by_android()833 glp.delete_group(name='aaa')834 @tags('ALL', 'CONTACT', 'CMCC')835 def test_contacts_quxinli_0388(self):836 """分组详情操作界面-分组只有一个人员点击群发消息"""837 glp = GroupListPage()838 glp.delete_group(name='aaa')839 glp.new_group(name='aaa')840 glp.click_text('aaa')841 time.sleep(1)842 glp.click_text('添加成员')843 time.sleep(1)844 slcp = SelectLocalContactsPage()845 slcp.swipe_select_one_member_by_name('大佬1')846 slcp.click_sure()847 time.sleep(2)848 glp.send_message_to_group()849 time.sleep(1)850 SingleChatPage().is_on_this_page()851 glp.page_should_contain_text('大佬1')852 def tearDown_test_contacts_quxinli_0388(self):853 glp = GroupListPage()854 glp.click_back_by_android(2)855 glp.delete_group(name='aaa')856 @tags('ALL', 'CONTACT', 'CMCC')857 def test_contacts_quxinli_0389(self):858 """分组详情操作界面-分组有多个人员点击群发消息"""859 glp = GroupListPage()860 glp.delete_group(name='aaa')861 glp.new_group(name='aaa')862 # 添加联系人大佬1 大佬2863 time.sleep(2)864 glp.click_text('aaa')865 time.sleep(1)866 glp.click_text('添加成员')867 slcp = SelectLocalContactsPage()868 slcp.swipe_select_one_member_by_name('大佬1')869 time.sleep(1)870 slcp.swipe_select_one_member_by_name('大佬2')871 slcp.click_sure()872 time.sleep(2)873 # 验证页面元素874 glp.send_message_to_group()875 time.sleep(1)876 glp.page_contain_element(locator='多方通话_图标')877 glp.page_contain_element(locator='分组联系人')878 glp.page_contain_element(locator='富媒体面板')879 glp.page_contain_element(locator='aaa')880 def tearDown_test_contacts_quxinli_0389(self):881 glp = GroupListPage()882 glp.click_back_by_android(2)883 glp.delete_group(name='aaa')884 @tags('ALL', 'CONTACT', 'CMCC')885 def test_contacts_quxinli_0390(self):886 """分组详情操作界面-群发消息-发送消息"""887 glp = GroupListPage()888 glp.delete_group(name='aaa')889 glp.new_group(name='aaa')890 # 添加小组成员891 glp.click_text('aaa')892 time.sleep(1)893 glp.click_text('添加成员')894 slcp = SelectLocalContactsPage()895 time.sleep(2)896 slcp.swipe_select_one_member_by_name('大佬1')897 slcp.click_sure()898 time.sleep(2)899 message = str('aa aa'*20)900 glp.send_message_to_group([message])901 time.sleep(1)902 glp.page_contain_element('已转短信送达')903 # 发送纯文本904 glp.click_back_by_android(2)905 time.sleep(1)906 message = 'aaaa'907 glp.send_message_to_group(message)908 time.sleep(5)909 glp.page_contain_element('已转短信送达')910 # 发送文本 空格911 glp.click_back_by_android(2)912 time.sleep(1)913 message = 'aa aa'914 glp.send_message_to_group(message)915 time.sleep(5)916 glp.page_contain_element('已转短信送达')917 # 发送表情918 glp.click_back_by_android(2)919 time.sleep(1)920 glp.send_express_to_group()921 time.sleep(1)922 glp.page_not_contain_element('发送失败')923 # 发送图片924 glp.click_back_by_android()925 time.sleep(1)926 glp.send_picture_to_group()927 time.sleep(2)928 glp.page_not_contain_element('发送失败')929 time.sleep(1)930 def tearDown_test_contacts_quxinli_0390(self):931 glp = GroupListPage()932 glp.click_back_by_android(2)933 glp.delete_group(name='aaa')934 @tags('ALL', 'CONTACT', 'CMCC')935 def test_contacts_quxinli_0394(self):936 """分组联系人进入Profile页-星标"""937 glp = GroupListPage()938 glp.delete_group(name='aaa')939 glp.new_group(name='aaa')940 # 添加成员941 glp.click_text('aaa')942 time.sleep(1)943 glp.click_text('添加成员')944 time.sleep(1)945 slcp = SelectLocalContactsPage()946 slcp.swipe_select_one_member_by_name('大佬1')947 slcp.swipe_select_one_member_by_name('大佬2')948 time.sleep(1)949 slcp.click_sure()950 time.sleep(1)951 # 进入群发页面952 glp.enter_group_message()953 glp.click_divide_group_icon()954 glp.page_contain_element(locator='分组联系人_标题')955 glp.click_text("大佬1")956 time.sleep(1)957 glp.click_star_icon()958 if glp.is_toast_exist('已成功添加为星标联系人'):959 time.sleep(1)960 else:961 time.sleep(1)962 glp.click_star_icon()963 glp.is_toast_exist("已成功添加为星标联系人")964 time.sleep(1)965 glp.click_star_icon()966 glp.is_toast_exist("已取消添加为星标联系人")967 # 再次点击星标968 glp.click_star_icon()969 time.sleep(1)970 glp.click_back_by_android(5)971 glp.page_contain_star('大佬1')972 def tearDown_test_contacts_quxinli_0394(self):973 try:974 # 去除'大佬1'的星标975 ContactsPage().select_contacts_by_name('大佬1')976 glp = GroupListPage()977 glp.click_star_icon()978 if glp.is_toast_exist('已取消添加为星标联系人'):979 time.sleep(2)980 else:981 time.sleep(1)982 glp.click_star_icon()983 time.sleep(1)984 # 删除群组985 glp.click_back_by_android()986 time.sleep(1)987 contact = ContactsPage()988 contact.click_label_grouping()989 time.sleep(1)990 glp.delete_group(name='aaa')991 except:992 pass993 @tags('ALL', 'CONTACT', 'CMCC')994 def test_contacts_quxinli_0395(self):995 """分组联系人进入Profile页-编辑"""996 glp = GroupListPage()997 glp.delete_group(name='aaa')998 glp.new_group(name='aaa')999 glp.click_text('aaa')1000 time.sleep(1)1001 glp.click_text('添加成员')1002 time.sleep(1)1003 slcp = SelectLocalContactsPage()1004 slcp.swipe_select_one_member_by_name('大佬1')1005 slcp.swipe_select_one_member_by_name('大佬2')1006 slcp.click_sure()1007 time.sleep(1)1008 glp.enter_group_message()1009 glp.click_divide_group_icon()1010 time.sleep(1)1011 glp.page_contain_element(locator='分组联系人_标题')1012 glp.click_text("大佬1")1013 time.sleep(1)1014 cdp = ContactDetailsPage()1015 cdp.click_edit_contact()1016 time.sleep(1)1017 ccp = CreateContactPage()1018 ccp.click_input_number()1019 ccp.input_number('13800138006')1020 time.sleep(1)1021 cdp.click_sure_icon()1022 time.sleep(1)1023 cdp.click_edit_contact()1024 time.sleep(1)1025 ccp.click_input_number()1026 ccp.input_number('13800138005')1027 time.sleep(1)1028 cdp.click_sure_icon()1029 time.sleep(1)1030 glp.is_toast_exist("保存成功")1031 cdp.is_text_present('13800138005')1032 def tearDown_test_contacts_quxinli_0395(self):1033 glp = GroupListPage()1034 glp.click_back_by_android(3)1035 glp.delete_group(name='aaa')1036 @tags('ALL', 'CONTACT', 'CMCC')1037 def test_contacts_quxinli_0396(self):1038 """分组联系人进入Profile页-编辑-删除联系人"""1039 glp = GroupListPage()1040 glp.delete_group(name='aaa')1041 glp.new_group(name='aaa')1042 # 进入分组 添加成员1043 glp.click_text('aaa')1044 time.sleep(1)1045 glp.click_text('添加成员')1046 time.sleep(1)1047 slcp = SelectLocalContactsPage()1048 slcp.swipe_select_one_member_by_name('大佬1')1049 slcp.swipe_select_one_member_by_name('大佬2')1050 slcp.click_sure()1051 time.sleep(1)1052 # 进入群发消息页面1053 glp.enter_group_message()1054 glp.click_divide_group_icon()1055 time.sleep(1)1056 glp.page_contain_element(locator='分组联系人_标题')1057 glp.click_text("大佬2")1058 time.sleep(2)1059 cdp = ContactDetailsPage()1060 cdp.click_edit_contact()1061 time.sleep(1)1062 cdp.hide_keyboard()1063 cdp.page_up()1064 cdp.change_delete_number()1065 time.sleep(1)1066 cdp.click_sure_delete()1067 time.sleep(1)1068 glp.click_back_by_android(2)1069 def tearDown_test_contacts_quxinli_0396(self):1070 glp = GroupListPage()1071 glp.delete_group(name='aaa')1072 time.sleep(1)1073 # 删除该联系人后添加联系人1074 glp.click_back_by_android()1075 time.sleep(1)1076 ContactsPage().click_add()1077 time.sleep(1)1078 ccp = CreateContactPage()1079 ccp.click_input_name()1080 ccp.input_name('大佬2')1081 ccp.click_input_number()1082 ccp.input_number('13800138006')1083 ccp.click_save()1084 @tags('ALL', 'CONTACT', '多方通话-跳过')1085 def test_contacts_quxinli_0397(self):1086 """“分组详情操作”界面-多方电话"""1087 GroupPage = GroupListPage()1088 cdp=ContactDetailsPage()1089 time.sleep(1)1090 GroupPage.delete_group(name='aaa')1091 GroupPage.new_group(name='aaa')1092 #进入群组,添加联系人1093 GroupPage.click_text('aaa')1094 GroupPage.tap_sure_box()1095 LabelGroupingChatPage().click_text('添加成员')1096 slcp = SelectLocalContactsPage()1097 time.sleep(2)1098 slcp.swipe_select_one_member_by_name('大佬1')1099 slcp.swipe_select_one_member_by_name('大佬3')1100 slcp.click_sure()1101 time.sleep(1)1102 #多方通话1103 GroupPage.enter_mutil_call()1104 time.sleep(1)1105 GroupPage.click_text("大佬1")1106 cdp.send_call_number()1107 if GroupPage.is_text_present('我知道了'):1108 time.sleep(2)1109 GroupPage.click_text('我知道了')1110 if GroupPage.is_text_present('发起多方电话失败'):1111 pass1112 else:1113 # cdp.send_call_number()1114 cdp.cancel_permission()1115 time.sleep(3)1116 cdp.cancel_hefeixin_call()1117 time.sleep(2)1118 def tearDown_test_contacts_quxinli_0397(self):1119 GroupPage = GroupListPage()1120 GroupPage.click_back_button()1121 GroupPage.delete_group(name='aaa')1122 @tags('ALL', 'CONTACT', 'CMCC')1123 def test_contacts_quxinli_0398(self):1124 """“分组详情操作”界面-多方视频"""1125 GroupPage = GroupListPage()1126 cdp = ContactDetailsPage()1127 time.sleep(1)1128 GroupPage.delete_group(name='aaa')1129 GroupPage.new_group(name='aaa')1130 GroupPage.click_text('aaa')1131 GroupPage.tap_sure_box()1132 LabelGroupingChatPage().click_text('添加成员')1133 slcp = SelectLocalContactsPage()1134 time.sleep(1)1135 slcp.swipe_select_one_member_by_name('大佬1')1136 time.sleep(1)1137 slcp.click_sure()1138 time.sleep(1)1139 GroupPage.enter_mutil_video_call()1140 time.sleep(2)1141 while GroupPage.is_text_present('始终允许'):1142 GroupPage.click_text('始终允许')1143 time.sleep(1)1144 GroupPage.click_text("大佬1")1145 time.sleep(2)1146 cdp.send_call_number()1147 if cdp.is_text_present('暂不开启'):1148 cdp.cancel_permission()1149 cdp.end_video_call()1150 def tearDown_test_contacts_quxinli_0398(self):1151 GroupPage = GroupListPage()1152 time.sleep(1)1153 SelectOneGroupPage().click_back_by_android()1154 time.sleep(1)1155 GroupPage.delete_group(name='aaa')1156 @tags('ALL', 'CONTACT', 'CMCC')1157 def test_contacts_quxinli_0407(self):1158 """“分组设置-特殊符号标签名称1159 auther:darcy1160 """1161 GroupPage = GroupListPage()1162 time.sleep(1)1163 GroupPage.delete_group(name='aaa')1164 GroupPage.new_group(name='aaa')1165 GroupPage.click_text('aaa')1166 GroupPage.tap_sure_box()1167 GroupPage.click_settings_button()1168 GroupPage.update_label_name(name='*@!#')1169 GroupPage.click_back_button(times=2)1170 GroupPage.page_should_contain_text(text='*@!#')1171 def tearDown_test_contacts_quxinli_0407(self):1172 GroupPage = GroupListPage()1173 GroupPage.delete_group(name='*@!#')1174 @tags('ALL', 'CONTACT', 'CMCC')1175 def test_contacts_quxinli_0408(self):1176 """“分组设置-各种标签名称1177 auther:darcy1178 """1179 GroupPage = GroupListPage()1180 time.sleep(1)1181 GroupPage.delete_group(name='aaa')1182 GroupPage.new_group(name='aaa')1183 GroupPage.click_text('aaa')1184 GroupPage.tap_sure_box()1185 GroupPage.click_settings_button()1186 GroupPage.update_label_name(name='*@!#123好')1187 GroupPage.click_back_button(times=2)1188 GroupPage.page_should_contain_text(text='*@!#123好')1189 def tearDown_test_contacts_quxinli_0408(self):1190 GroupPage = GroupListPage()1191 GroupPage.delete_group(name='*@!#123好')1192 @tags('ALL', 'CONTACT', 'CMCC')1193 def test_contacts_quxinli_0409(self):1194 """“分组设置-各种标签名称删除1195 auther:darcy1196 """1197 GroupPage = GroupListPage()1198 time.sleep(1)1199 GroupPage.delete_group(name='aaa')1200 GroupPage.new_group(name='aaa')1201 GroupPage.click_text('aaa')1202 GroupPage.tap_sure_box()1203 GroupPage.click_settings_button()1204 GroupPage.delete_label_name(name='*@!#123好')1205 GroupPage.page_should_contain_text(text="请输入标签分组名称")1206 GroupPage.click_back_button(times=3)1207 def tearDown_test_contacts_quxinli_0409(self):1208 GroupPage = GroupListPage()1209 GroupPage.delete_group(name='*@!#123好')1210 @tags('ALL', 'CONTACT-debug', 'CMCC')1211 def test_contacts_quxinli_0414(self):1212 """分组设置-搜索移除成员1213 auther:darcy1214 """1215 GroupPage = GroupListPage()1216 time.sleep(1)1217 GroupPage.delete_group(name='aaa')1218 GroupPage.new_group(name='aaa')1219 #添加成员1220 GroupPage.click_text('aaa')1221 GroupPage.tap_sure_box()1222 time.sleep(1)1223 LabelGroupingChatPage().click_text('添加成员')1224 slcp = SelectLocalContactsPage()1225 time.sleep(1)1226 slcp.swipe_select_one_member_by_name('大佬1')1227 slcp.click_sure()1228 time.sleep(2)1229 #移除成员1230 GroupPage.click_settings_button()1231 GroupPage.click_move_label()1232 time.sleep(1)1233 GroupPage.search_menber_text(text='dalao1')1234 time.sleep(1)1235 GroupPage.click_text('大佬1')1236 time.sleep(1)1237 GroupPage.click_sure_element()1238 time.sleep(1)1239 GroupPage.click_move_label()1240 time.sleep(1)1241 GroupPage.page_should_not_contain_text("大佬1")1242 def tearDown_test_contacts_quxinli_0414(self):1243 GroupPage = GroupListPage()1244 GroupPage.click_back_button(times=3)1245 GroupPage.delete_group(name='aaa')1246 @tags('ALL', 'CONTACT-debug', 'CMCC')1247 def test_contacts_quxinli_0415(self):1248 """分组设置-删除标签1249 auther:darcy1250 """1251 GroupPage = GroupListPage()1252 time.sleep(1)1253 GroupPage.new_group(name='ccc')1254 GroupPage.delete_group(name='ccc')1255 GroupPage.click_back_by_android(times=2)1256 @tags('ALL', 'CONTACT-debug', 'CMCC')1257 def test_contacts_quxinli_0416(self):1258 """分组详情操作页面进入Profile页"""1259 glp = GroupListPage()1260 glp.delete_group(name='aaa')1261 glp.new_group(name='aaa')1262 # 添加成员1263 glp.click_text('aaa')1264 time.sleep(1)1265 glp.click_text('添加成员')1266 time.sleep(1)1267 slcp = SelectLocalContactsPage()1268 slcp.swipe_select_one_member_by_name('大佬3')1269 slcp.swipe_select_one_member_by_name('大佬4')1270 time.sleep(1)1271 slcp.click_sure()1272 time.sleep(1)1273 glp.enter_group_message()1274 glp.click_divide_group_icon()1275 time.sleep(1)1276 glp.page_contain_element(locator='分组联系人_标题')1277 glp.click_text("大佬3")1278 time.sleep(1)1279 glp.page_contain_element(locator='语音通话')1280 glp.page_contain_element(locator='视频通话')1281 glp.page_contain_element(locator='分享名片')1282 glp.click_share_button()1283 time.sleep(1)1284 scp = SelectContactsPage()1285 scp.click_select_one_group()1286 time.sleep(1)1287 scp.click_group_search()1288 time.sleep(3)1289 scp.group_search('给个红包1')1290 time.sleep(3)1291 scp.select_one_group_by_name2('给个红包1')1292 time.sleep(2)1293 scp.click_share_card()1294 time.sleep(2)1295 def tearDown_test_contacts_quxinli_0416(self):1296 glp = GroupListPage()1297 glp.click_back_by_android(3)1298 glp.delete_group(name='aaa')1299 @tags('ALL', 'CONTACT-debug', 'CMCC')1300 def test_contacts_quxinli_0417(self):1301 """分组详情操作页面进入Profile页_星标"""1302 glp = GroupListPage()1303 glp.delete_group(name='aaa')1304 glp.new_group(name='aaa')1305 # 添加成员1306 glp.click_text('aaa')1307 time.sleep(1)1308 glp.click_text('添加成员')1309 time.sleep(1)1310 slcp = SelectLocalContactsPage()1311 slcp.swipe_select_one_member_by_name('大佬3')1312 slcp.swipe_select_one_member_by_name('大佬4')1313 time.sleep(1)1314 slcp.click_sure()1315 time.sleep(1)1316 # 群发信息1317 glp.enter_group_message()1318 time.sleep(1)1319 glp.click_divide_group_icon()1320 time.sleep(1)1321 glp.page_contain_element(locator='分组联系人_标题')1322 glp.click_text("大佬3")1323 time.sleep(1)1324 glp.click_star_icon()1325 if glp.is_toast_exist('已成功添加为星标联系人'):1326 time.sleep(1)1327 else:1328 time.sleep(1)1329 glp.click_star_icon()1330 glp.is_toast_exist("已成功添加为星标联系人")1331 glp.click_back_by_android(times=5)1332 glp.page_contain_star('大佬3')1333 def tearDown_test_contacts_quxinli_0417(self):1334 # 去除'大佬3'的星标1335 ContactsPage().select_contacts_by_name('大佬3')1336 time.sleep(1)1337 glp = GroupListPage()1338 glp.click_star_icon()1339 glp.is_toast_exist("已取消添加为星标联系人")1340 glp.click_back_by_android()1341 contact = ContactsPage()1342 contact.click_label_grouping()1343 glp.delete_group(name='aaa')1344 @tags('ALL', 'CONTACT', 'CMCC')1345 def test_contacts_quxinli_0421(self):1346 """安卓手机:手机系统本地新建分组名称等于30个字符的分组1347 auther:darcy"""1348 GroupPage = GroupListPage()1349 time.sleep(1)1350 GroupPage.delete_group(name='aaa')1351 name="a"*301352 GroupPage.new_group(name=name)1353 GroupPage.click_text(name)1354 time.sleep(1)1355 GroupPage.tap_sure_box()1356 GroupPage.click_settings_button()1357 GroupPage.update_label_name(name='aaa')1358 GroupPage.click_back_button(times=2)1359 time.sleep(1)1360 GroupPage.page_should_contain_text(text='aaa')1361 #添加成员1362 GroupPage.click_text('aaa')1363 GroupPage.tap_sure_box()1364 time.sleep(1)1365 LabelGroupingChatPage().click_text('添加成员')1366 slcp = SelectLocalContactsPage()1367 time.sleep(1)1368 slcp.swipe_select_one_member_by_name('大佬6')1369 slcp.swipe_select_one_member_by_name('大佬7')1370 slcp.click_sure()1371 time.sleep(2)1372 #进入设置界面1373 GroupPage.click_settings_button()1374 time.sleep(1)1375 GroupPage.click_move_label()1376 time.sleep(1)1377 GroupPage.click_text('大佬6')1378 time.sleep(1)1379 GroupPage.click_sure_element()1380 time.sleep(1)1381 GroupPage.click_move_label()1382 time.sleep(1)1383 GroupPage.page_should_not_contain_text("大佬6")1384 def tearDown_test_contacts_quxinli_0421(self):1385 Preconditions.enter_label_grouping_chat_page()1386 GroupPage = GroupListPage()1387 # GroupPage.click_back_button(times=4)1388 time.sleep(1)1389 GroupPage.delete_group(name='aaa')1390 @tags('ALL', 'CONTACT', 'CMCC')1391 def test_contacts_quxinli_0360(self):1392 """新建分组,标签分组名称输入30个数字"""1393 GroupPage = GroupListPage()1394 time.sleep(1)1395 LabelGroupingPage().delete_all_label()1396 GroupPage.click_new_group()1397 GroupPage.click_input_element()1398 time.sleep(1)1399 self.message1 = '2' * 301400 GroupPage.input_content(text=self.message1)1401 time.sleep(1)1402 GroupPage.click_sure_element()1403 time.sleep(1)1404 GroupPage.page_should_contain_text('选择联系人')1405 def tearDown_test_contacts_quxinli_0360(self):1406 GroupPage = GroupListPage()1407 Preconditions.enter_label_grouping_chat_page()1408 GroupPage.delete_group(name=self.message1)1409 @tags('ALL', 'CONTACT', 'CMCC')1410 def test_contacts_quxinli_0361(self):1411 """新建分组,标签分组名称输入31个数字"""1412 GroupPage = GroupListPage()1413 time.sleep(1)1414 GroupPage.click_new_group()1415 GroupPage.click_input_element()1416 text="1"*311417 GroupPage.input_content(text)1418 time.sleep(1)1419 name=GroupPage.get_text_of_lablegrouping_name()1420 self.assertNotEqual(text,name)1421 self.assertTrue(len(name) == 30)1422 #删除标签分组1423 time.sleep(1)1424 LabelGroupingPage().click_back()1425 @tags('ALL', 'CONTACT', 'CMCC')1426 def test_contacts_quxinli_0362(self):1427 """新建分组,标签分组名称输入29个字母"""1428 GroupPage = GroupListPage()1429 time.sleep(1)1430 GroupPage.click_new_group()1431 GroupPage.click_input_element()1432 time.sleep(1)1433 self.message = 'a' * 291434 GroupPage.input_content(text=self.message)1435 time.sleep(1)1436 GroupPage.click_sure_element()1437 time.sleep(1)1438 GroupPage.page_should_contain_text('选择联系人')1439 def tearDown_test_contacts_quxinli_0362(self):1440 GroupPage = GroupListPage()1441 GroupPage.click_back_button()1442 time.sleep(1)1443 GroupPage.click_back_button()1444 time.sleep(1)1445 GroupPage.delete_group(name=self.message)1446 @tags('ALL', 'debug', 'CMCC')1447 def test_contacts_quxinli_0363(self):1448 """新建分组,标签分组名称输入30个字母"""1449 GroupPage = GroupListPage()1450 time.sleep(1)1451 GroupPage.click_new_group()1452 GroupPage.click_input_element()1453 time.sleep(1)1454 self.message2 = 'c' * 301455 GroupPage.input_content(text=self.message2)1456 time.sleep(1)1457 GroupPage.click_sure_element()1458 time.sleep(1)1459 GroupPage.page_should_contain_text('选择联系人')1460 def tearDown_test_contacts_quxinli_0363(self):1461 GroupPage = GroupListPage()1462 GroupPage.click_back_button()1463 time.sleep(1)1464 GroupPage.click_back_button()1465 time.sleep(1)1466 GroupPage.delete_group(name=self.message2)1467 @tags('ALL', 'CONTACT', 'CMCC')1468 def test_contacts_quxinli_0364(self):1469 """新建分组,标签分组名称输入31字母"""1470 GroupPage = GroupListPage()1471 time.sleep(1)1472 GroupPage.click_new_group()1473 GroupPage.click_input_element()1474 text="a"*311475 GroupPage.input_content(text)1476 time.sleep(1)1477 name=GroupPage.get_text_of_lablegrouping_name()1478 self.assertNotEqual(text,name)1479 self.assertTrue(len(name) == 30)1480 #删除标签分组1481 time.sleep(1)1482 LabelGroupingPage().click_back()1483 @tags('ALL', 'debug', 'CMCC')1484 def test_contacts_quxinli_0365(self):1485 """新建分组,标签分组名称输入29个字符:汉字、数字、英文字母、空格和特殊字符组合"""1486 GroupPage = GroupListPage()1487 time.sleep(1)1488 GroupPage.click_new_group()1489 GroupPage.click_input_element()1490 time.sleep(1)1491 self.message3 = 'aa111@@@文 aaa111@@@文 aaaa'1492 GroupPage.input_content(text=self.message3)1493 time.sleep(1)1494 GroupPage.click_sure_element()1495 time.sleep(1)1496 GroupPage.page_should_contain_text('选择联系人')1497 def tearDown_test_contacts_quxinli_0365(self):1498 GroupPage = GroupListPage()1499 GroupPage.click_back_button()1500 time.sleep(1)1501 GroupPage.click_back_button()1502 time.sleep(1)1503 GroupPage.delete_group(name=self.message3)1504 @tags('ALL', 'debug', 'CMCC')1505 def test_contacts_quxinli_0366(self):1506 """新建分组,标签分组名称输入30个字符:汉字、数字、英文字母、空格和特殊字符组合"""1507 GroupPage = GroupListPage()1508 time.sleep(1)1509 GroupPage.click_new_group()1510 GroupPage.click_input_element()1511 time.sleep(1)1512 self.message4 = 'aa111@@@文 aaa111@@@文 aaaaa'1513 GroupPage.input_content(text=self.message4)1514 time.sleep(1)1515 GroupPage.click_sure_element()1516 time.sleep(1)1517 GroupPage.page_should_contain_text('选择联系人')1518 def tearDown_test_contacts_quxinli_0366(self):1519 GroupPage = GroupListPage()1520 GroupPage.click_back_button()1521 time.sleep(1)1522 GroupPage.click_back_button()1523 time.sleep(1)1524 GroupPage.delete_group(name=self.message4)1525 @tags('ALL', 'CONTACT', 'CMCC')1526 def test_contacts_quxinli_0367(self):1527 '''1528 标签分组名称输入31个字符:汉字、数字、英文字母、空格和特殊字符组合(中文占据3个字符)1529 '''1530 GroupPage = GroupListPage()1531 time.sleep(1)1532 GroupPage.click_new_group()1533 GroupPage.click_input_element()1534 text="aa111@@@文 aaa111@@@文 aaaaad"1535 GroupPage.input_content(text)1536 time.sleep(1)1537 name=GroupPage.get_text_of_lablegrouping_name()1538 self.assertNotEqual(text,name)1539 self.assertTrue(len(name) == 26)1540 #删除标签分组1541 time.sleep(1)1542 LabelGroupingPage().click_back()1543 @tags('ALL', 'debug', 'CMCC')1544 def test_contacts_quxinli_0368(self):1545 '''1546 新建分组进入选择联系人页面后点击返回,重名检查1547 '''1548 GroupPage = GroupListPage()1549 time.sleep(1)1550 GroupPage.click_new_group()1551 GroupPage.click_input_element()1552 time.sleep(1)1553 self.message6 = 'aaaa'1554 GroupPage.input_content(text=self.message6)1555 time.sleep(1)1556 GroupPage.click_sure_element()1557 time.sleep(1)1558 GroupPage.click_back_button()1559 time.sleep(1)1560 GroupPage.click_sure_element()1561 LabelGroupingPage().is_group_exist_tips_popup()1562 # GroupPage.is_toast_exist('群组已存在')1563 def tearDown_test_contacts_quxinli_0368(self):1564 GroupPage = GroupListPage()1565 GroupPage.click_back_button()1566 time.sleep(1)1567 GroupPage.delete_group(name=self.message6)1568 @tags('ALL', 'debug', 'CMCC')1569 def test_contacts_quxinli_0391(self):1570 """分组详情操作界面-群发消息-多方通话图标"""1571 glp = GroupListPage()1572 glp.delete_group(name='aaa')1573 glp.new_group(name='aaa')1574 # 添加联系人大佬1 大佬21575 time.sleep(2)1576 glp.click_text('aaa')1577 time.sleep(1)1578 glp.click_text('添加成员')1579 time.sleep(1)1580 slcp = SelectLocalContactsPage()1581 slcp.swipe_select_one_member_by_name('大佬1')1582 time.sleep(1)1583 slcp.swipe_select_one_member_by_name('大佬2')1584 time.sleep(1)1585 slcp.click_sure()1586 time.sleep(2)1587 # 判断页面包含的元素1588 glp.page_contain_element(locator='飞信电话')1589 glp.page_contain_element(locator='多方视频')1590 def tearDown_test_contacts_quxinli_0391(self):1591 glp = GroupListPage()1592 glp.delete_group(name='aaa')1593 @tags('ALL', 'CONTACT', 'CMCC')1594 def test_contacts_quxinli_0392(self):1595 """分组详情操作界面-群发消息-分组联系人图标"""1596 glp = GroupListPage()1597 time.sleep(1)1598 glp.delete_group(name='aaa')1599 glp.new_group(name='aaa')1600 # 添加联系人大佬1 大佬21601 time.sleep(2)1602 glp.click_text('aaa')1603 time.sleep(1)1604 glp.click_text('添加成员')1605 time.sleep(1)1606 slcp = SelectLocalContactsPage()1607 slcp.swipe_select_one_member_by_name('大佬1')1608 time.sleep(1)1609 slcp.swipe_select_one_member_by_name('大佬2')1610 slcp.click_sure()1611 time.sleep(2)1612 # 判断页面元素1613 glp.click_send_message_to_group()1614 glp.click_divide_group_icon()1615 glp.page_should_contain_text("分组联系人")1616 glp.page_should_contain_text("大佬1")1617 glp.page_should_contain_text("大佬2")1618 glp.check_if_contains_element(text='分组联系人-姓名')1619 glp.check_if_contains_element(text='分组联系人-电话号码')1620 def tearDown_test_contacts_quxinli_0392(self):1621 glp = GroupListPage()1622 glp.click_back_by_android(2)1623 glp.delete_group(name='aaa')1624 @tags('ALL', 'CONTACT', 'CMCC')1625 def test_contacts_quxinli_0393(self):1626 """分组联系人进入Profile页"""1627 glp = GroupListPage()1628 glp.delete_group(name='aaa')1629 glp.new_group(name='aaa')1630 # 添加联系人大佬1 大佬21631 glp.click_text('aaa')1632 time.sleep(1)1633 glp.click_text('添加成员')1634 slcp = SelectLocalContactsPage()1635 slcp.swipe_select_one_member_by_name('大佬1')1636 slcp.swipe_select_one_member_by_name('大佬2')1637 slcp.click_sure()1638 time.sleep(2)1639 # 判断页面元素1640 glp.click_send_message_to_group()1641 time.sleep(1)1642 glp.click_divide_group_icon()1643 time.sleep(1)1644 glp.page_contain_element(locator='分组联系人_标题')1645 glp.click_text("大佬1")1646 time.sleep(1)1647 detailpage = ContactDetailsPage()1648 detailpage.is_exists_contacts_name()1649 detailpage.is_exists_contacts_number()1650 detailpage.page_should_contain_element_first_letter2()1651 if detailpage.is_text_present("公司"):1652 detailpage.page_should_contain_text('公司')1653 if detailpage.is_text_present("职位"):1654 detailpage.page_should_contain_text('职位')1655 if detailpage.is_text_present("邮箱"):1656 detailpage.page_should_contain_text('邮箱')1657 detailpage.page_should_contain_text('消息')1658 detailpage.page_should_contain_text('电话')1659 detailpage.page_should_contain_text('语音通话')1660 detailpage.page_should_contain_text('视频通话')1661 detailpage.page_should_contain_text('飞信电话')1662 detailpage.page_should_contain_text('分享名片')1663 time.sleep(1)1664 detailpage.click_share_business_card()1665 time.sleep(1)1666 SelectContactsPage().select_local_contacts()1667 time.sleep(1)1668 SelectContactsPage().click_one_contact('大佬1')1669 time.sleep(1)1670 SelectContactsPage().click_share_card()1671 def tearDown_test_contacts_quxinli_0393(self):1672 glp = GroupListPage()1673 glp.click_back_by_android(3)1674 glp.delete_group(name='aaa')1675 @tags('ALL', 'CONTACT', 'CMCC')1676 def test_contacts_quxinli_0399(self):1677 """“分组设置入口"""1678 glp = GroupListPage()1679 glp.delete_group(name='aaa')1680 glp.new_group(name='aaa')1681 glp.click_text('aaa')1682 glp.tap_sure_box()1683 glp.click_settings_button()1684 glp.page_contain_element("标签设置")1685 def tearDown_test_contacts_quxinli_0399(self):1686 glp = GroupListPage()1687 glp.click_back_button(times=2)1688 glp.delete_group(name='aaa')1689 @tags('ALL', 'CONTACT', 'CMCC')1690 def test_contacts_quxinli_0400(self):1691 """“分组设置返回,"""1692 glp = GroupListPage()1693 glp.delete_group(name='aaa')1694 glp.new_group(name='aaa')1695 glp.click_text('aaa')1696 glp.tap_sure_box()1697 glp.click_settings_button()1698 glp.click_back_button(times=1)1699 glp.page_not_contain_element("标签设置")1700 def tearDown_test_contacts_quxinli_0400(self):1701 glp = GroupListPage()1702 glp.click_back_button(times=1)1703 glp.delete_group(name='aaa')1704 @tags('ALL', 'CONTACT', 'CMCC')1705 def test_contacts_quxinli_0401(self):1706 """“分组设置界面"""1707 glp = GroupListPage()1708 glp.delete_group(name='aaa')1709 glp.new_group(name='aaa')1710 glp.click_text('aaa')1711 glp.tap_sure_box()1712 glp.click_settings_button()1713 glp.page_contain_element("标签设置")1714 glp.page_contain_element("删除标签")1715 glp.page_contain_element("移除成员")1716 glp.page_contain_element("标签名称")1717 def tearDown_test_contacts_quxinli_0401(self):1718 glp = GroupListPage()1719 glp.click_back_button(times=1)1720 glp.delete_group(name='aaa')1721 @tags('ALL', 'CONTACT', 'CMCC')1722 def test_contacts_quxinli_0402(self):1723 """“分组设置-标签名称"""1724 glp = GroupListPage()1725 glp.delete_group(name='aaa')1726 glp.new_group(name='aaa')1727 glp.click_text('aaa')1728 glp.tap_sure_box()1729 glp.click_settings_button()1730 glp.click_label_name()1731 glp.page_contain_element("修改标签名称")1732 def tearDown_test_contacts_quxinli_0402(self):1733 glp = GroupListPage()1734 glp.click_back_button(times=3)1735 glp.delete_group(name='aaa')1736 @tags('ALL', 'CONTACT', 'CMCC')1737 def test_contacts_quxinli_0403(self):1738 """“分组设置-字母标签名称"""1739 glp = GroupListPage()1740 glp.delete_group(name='aaa')1741 glp.new_group(name='aaa')1742 glp.click_text('aaa')1743 glp.tap_sure_box()1744 glp.click_settings_button()1745 glp.update_label_name(name='bbb')1746 glp.click_back_button(times=2)1747 glp.page_should_contain_text(text='bbb')1748 def tearDown_test_contacts_quxinli_0403(self):1749 glp = GroupListPage()1750 glp.delete_group(name='bbb')1751 @tags('ALL', 'CONTACT', 'CMCC')1752 def test_contacts_quxinli_0404(self):1753 """“分组设置-中文标签名称"""1754 glp = GroupListPage()1755 glp.delete_group(name='aaa')1756 glp.new_group(name='aaa')1757 glp.click_text('aaa')1758 glp.tap_sure_box()1759 glp.click_settings_button()1760 glp.update_label_name(name='好记性')1761 glp.click_back_button(times=2)1762 glp.page_should_contain_text(text='好记性')1763 def tearDown_test_contacts_quxinli_0404(self):1764 glp = GroupListPage()1765 glp.delete_group(name='好记性')1766 @tags('ALL', 'CONTACT', 'CMCC')1767 def test_contacts_quxinli_0405(self):1768 """“分组设置-数字标签名称1769 auther:darcy1770 """1771 glp = GroupListPage()1772 glp.delete_group(name='aaa')1773 glp.new_group(name='aaa')1774 glp.click_text('aaa')1775 glp.tap_sure_box()1776 glp.click_settings_button()1777 glp.update_label_name(name='111')1778 glp.click_back_button(times=2)1779 glp.page_should_contain_text(text='111')1780 def tearDown_test_contacts_quxinli_0405(self):1781 glp = GroupListPage()1782 glp.delete_group(name='111')1783 @tags('ALL', 'CONTACT', 'CMCC')1784 def test_contacts_quxinli_0406(self):1785 """“分组设置-符号标签名称1786 auther:darcy1787 """1788 GroupPage = GroupListPage()1789 time.sleep(1)1790 GroupPage.delete_group(name='aaa')1791 GroupPage.new_group(name='aaa')1792 GroupPage.click_text('aaa')1793 GroupPage.tap_sure_box()1794 GroupPage.click_settings_button()1795 GroupPage.update_label_name(name='???')1796 GroupPage.click_back_button(times=2)1797 GroupPage.page_should_contain_text(text='???')1798 def tearDown_test_contacts_quxinli_0406(self):1799 GroupPage = GroupListPage()1800 GroupPage.delete_group(name='???')1801 @tags('ALL', 'CONTACT', 'CMCC')1802 def test_contacts_quxinli_0410(self):1803 """“分组设置-移除成员入口1804 auther:darcy1805 """1806 GroupPage = GroupListPage()1807 time.sleep(1)1808 GroupPage.delete_group(name='aaa')1809 GroupPage.new_group(name='aaa')1810 GroupPage.click_text('aaa')1811 GroupPage.tap_sure_box()1812 GroupPage.click_settings_button()1813 GroupPage.click_move_label()1814 GroupPage.page_contain_element(locator="移除成员_标题")1815 GroupPage.page_contain_element(locator="搜索标签分组成员")1816 GroupPage.click_back_button(times=3)1817 def tearDown_test_contacts_quxinli_0410(self):1818 GroupPage = GroupListPage()1819 GroupPage.delete_group(name='aaa')1820 @tags('ALL', 'CONTACT', 'CMCC')1821 def test_contacts_quxinli_0411(self):1822 """“分组设置-分组设置-移除成员1823 auther:darcy1824 """1825 GroupPage = GroupListPage()1826 time.sleep(1)1827 GroupPage.delete_group(name='aaa')1828 GroupPage.new_group(name='aaa')1829 GroupPage.click_text('aaa')1830 GroupPage.tap_sure_box()1831 GroupPage.click_settings_button()1832 GroupPage.click_move_label()1833 GroupPage.click_sure_element()1834 GroupPage.page_contain_element(locator="移除成员_标题")1835 def tearDown_test_contacts_quxinli_0411(self):1836 GroupPage = GroupListPage()1837 GroupPage.click_back_button(times=3)1838 GroupPage.delete_group(name='aaa')1839 @tags('ALL', 'CONTACT', 'CMCC')1840 def test_contacts_quxinli_0412(self):1841 """分组设置-移除成员选择"""1842 glp = GroupListPage()1843 glp.delete_group(name='aaa')1844 glp.new_group(name='aaa')1845 # 添加联系人大佬1 大佬21846 time.sleep(1)1847 glp.click_text('aaa')1848 time.sleep(1)1849 glp.click_text('添加成员')1850 time.sleep(1)1851 slcp = SelectLocalContactsPage()1852 slcp.swipe_select_one_member_by_name('大佬1')1853 slcp.swipe_select_one_member_by_name('大佬2')1854 slcp.click_sure()1855 time.sleep(3)1856 # 判断页面元素1857 glp.click_settings_button()1858 glp.click_move_label()1859 glp.click_text('大佬2')1860 time.sleep(1)1861 glp.page_contain_element(locator="成员头像")1862 glp.sure_icon_is_checkable()1863 glp.click_sure_element()1864 time.sleep(1)1865 glp.click_back_by_android(1)1866 glp.page_should_not_contain_text("大佬2")1867 def tearDown_test_contacts_quxinli_0412(self):1868 glp = GroupListPage()1869 glp.delete_group(name='aaa')1870 @tags('ALL', 'CONTACT', 'CMCC')1871 def test_contacts_quxinli_0413(self):1872 """分组设置-移除成员"""1873 glp = GroupListPage()1874 glp.delete_group(name='aaa')1875 glp.new_group(name='aaa')1876 # 添加联系人大佬1 大佬21877 time.sleep(2)1878 glp.click_text('aaa')1879 time.sleep(1)1880 glp.click_text('添加成员')1881 time.sleep(1)1882 slcp = SelectLocalContactsPage()1883 slcp.swipe_select_one_member_by_name('大佬1')1884 slcp.swipe_select_one_member_by_name('大佬2')1885 slcp.click_sure()1886 time.sleep(1)1887 # 判断页面元素1888 glp.click_settings_button()1889 glp.click_move_label()1890 glp.click_text('大佬2')1891 time.sleep(1)1892 glp.click_sure_element()1893 time.sleep(1)1894 glp.click_move_label()1895 time.sleep(1)1896 glp.page_should_not_contain_text("大佬2")1897 glp.is_element_present(locator='移除-已选择联系人')1898 def tearDown_test_contacts_quxinli_0413(self):1899 glp = GroupListPage()1900 glp.click_back_button(times=3)1901 glp.delete_group(name='aaa')1902if __name__ == '__main__':...

Full Screen

Full Screen

delete_group_test.py

Source:delete_group_test.py Github

copy

Full Screen

...14 "members": [{"id": "ok"}],15 "admins": [{"id": "ok"}]16 }17 saved_group = client.create_group(new_group, status=200)18 result = client.delete_group(saved_group["id"], status=200)19 assert_that(result["status"], is_("Deleted"))20 finally:21 if result:22 client.delete_group(saved_group["id"], status=(200, 404))23def test_delete_group_not_found(shared_zone_test_context):24 """25 Tests that deleting a group that does not exist returns a 40426 """27 client = shared_zone_test_context.ok_vinyldns_client28 client.delete_group("doesntexist", status=404)29def test_delete_group_that_is_already_deleted(shared_zone_test_context):30 """31 Tests that deleting a group that is already deleted32 """33 client = shared_zone_test_context.ok_vinyldns_client34 saved_group = None35 try:36 new_group = {37 "name": f"test-delete-group-already{shared_zone_test_context.partition_id}",38 "email": "test@test.com",39 "description": "this is a description",40 "members": [{"id": "ok"}],41 "admins": [{"id": "ok"}]42 }43 saved_group = client.create_group(new_group, status=200)44 client.delete_group(saved_group["id"], status=200)45 client.delete_group(saved_group["id"], status=404)46 finally:47 if saved_group:48 client.delete_group(saved_group["id"], status=(200, 404))49def test_delete_admin_group(shared_zone_test_context):50 """51 Tests that we cannot delete a group that is the admin of a zone52 """53 client = shared_zone_test_context.ok_vinyldns_client54 result_group = None55 result_zone = None56 try:57 # Create group58 new_group = {59 "name": "test-delete-group-already",60 "email": "test@test.com",61 "description": "this is a description",62 "members": [{"id": "ok"}],63 "admins": [{"id": "ok"}]64 }65 result_group = client.create_group(new_group, status=200)66 # Create zone with that group ID as admin67 zone = {68 "name": f"one-time{shared_zone_test_context.partition_id}.",69 "email": "test@test.com",70 "adminGroupId": result_group["id"],71 "connection": {72 "name": "vinyldns.",73 "keyName": VinylDNSTestContext.dns_key_name,74 "key": VinylDNSTestContext.dns_key,75 "primaryServer": VinylDNSTestContext.name_server_ip76 },77 "transferConnection": {78 "name": "vinyldns.",79 "keyName": VinylDNSTestContext.dns_key_name,80 "key": VinylDNSTestContext.dns_key,81 "primaryServer": VinylDNSTestContext.name_server_ip82 }83 }84 result = client.create_zone(zone, status=202)85 result_zone = result["zone"]86 client.wait_until_zone_active(result["zone"]["id"])87 client.delete_group(result_group["id"], status=400)88 # Delete zone89 client.delete_zone(result_zone["id"], status=202)90 client.wait_until_zone_deleted(result_zone["id"])91 # Should now be able to delete group92 client.delete_group(result_group["id"], status=200)93 finally:94 if result_zone:95 client.delete_zone(result_zone["id"], status=(202, 404))96 if result_group:97 client.delete_group(result_group["id"], status=(200, 404))98def test_delete_group_not_authorized(shared_zone_test_context):99 """100 Tests that only the admins can delete a zone101 """102 ok_client = shared_zone_test_context.ok_vinyldns_client103 not_admin_client = shared_zone_test_context.dummy_vinyldns_client104 try:105 new_group = {106 "name": "test-delete-group-not-authorized",107 "email": "test@test.com",108 "description": "this is a description",109 "members": [{"id": "ok"}],110 "admins": [{"id": "ok"}]111 }112 saved_group = ok_client.create_group(new_group, status=200)113 not_admin_client.delete_group(saved_group["id"], status=403)114 finally:115 if saved_group:...

Full Screen

Full Screen

test_delete.py

Source:test_delete.py Github

copy

Full Screen

...10 assert delete_group.body_parameters() == {}11@unittest.mock.patch('requests.Session.request')12def test_delete_calls_requests(mock, engine_url):13 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')14 delete_group()15 assert mock.called16 assert mock.call_args[1]['method'].upper() == 'DELETE'17@unittest.mock.patch('requests.Session.request', raise_requests_exception_mock)18def test_delete_raises_pycamunda_exception(engine_url):19 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')20 with pytest.raises(pycamunda.PyCamundaException):21 delete_group()22@unittest.mock.patch('requests.Session.request', not_ok_response_mock)23@unittest.mock.patch('pycamunda.base._raise_for_status')24def test_delete_raises_for_status(mock, engine_url):25 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')26 delete_group()27 assert mock.called28@unittest.mock.patch('requests.Session.request', unittest.mock.MagicMock())29def test_delete_returns_group(engine_url):30 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')31 result = delete_group()...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful