How to use page_should_contain_text method in robotframework-appiumlibrary

Best Python code snippet using robotframework-appiumlibrary_python

multipartyvideo.py

Source:multipartyvideo.py Github

copy

Full Screen

...344 mppg.click_contact_list_item(i)345 mppg.click_tv_sure()346 # CheckPoint:1.发起多方视频347 time.sleep(1)348 mppg.page_should_contain_text("关闭摄像头")349 @tags('ALL', 'CMCC', 'Call')350 def test_call_zhenyishan_0002(self):351 """多方视频入口检查:通话模块一级界面,多方视频按钮,wifi发起多方视频"""352 # 1、wifi连接正常353 # 2、当前为通话模块354 # Step:1、点击发起视频355 # Step:2、勾选2-8人,点击呼叫356 cpg = CallPage()357 cpg.click_multi_party_video()358 mppg = MultiPartyVideoPage()359 mppg.select_contacts_by_number("14775970982")360 mppg.select_contacts_by_number("13800138006")361 mppg.click_tv_sure()362 time.sleep(2)363 # CheckPoint:发起多方视频364 cpg.page_should_contain_text("关闭摄像头")365 @tags('ALL', 'CMCC', 'Call')366 def test_call_zhenyishan_0003(self):367 """多方视频入口检查:通话记录列表,wifi发起多方视频"""368 # 1、wifi连接正常369 # 2、通话记录列表已有多方视频记录370 # Step:1、点击多方视频通话记录371 self.test_call_zhenyishan_0002()372 # CheckPoint:发起多方视频373 cpg = CallPage()374 cpg.wait_for_call_page()375 cpg.click_call_entry()376 time.sleep(2)377 cpg.page_should_contain_text("关闭摄像头")378 @tags('ALL', 'CMCC', 'Call')379 def test_call_zhenyishan_0004(self):380 """多方视频入口检查:通话记录详情页,wifi发起多方视频"""381 # 1、wifi连接正常382 # 2、通话记录383 # Step:1、点击多方视频通话记录的“!”384 # Step:2、点击再次呼叫385 # CheckPoint:发起多方视频386 self.test_call_zhenyishan_0002()387 cpg = CallPage()388 cpg.wait_for_call_page()389 cpg.click_dial()390 cpg.click_call_time_search_status()391 time.sleep(1)392 mppg = MultiPartyVideoPage()393 mppg.click_call_again()394 time.sleep(1)395 cpg.page_should_contain_text("关闭摄像头")396 # @tags('ALL', 'CMCC', 'Call')397 # def test_call_zhenyishan_0005(self):398 # """多方视频入口检查:标签分组,wifi发起多方视频"""399 # # 1、wifi连接正常400 # # 2、当前为通讯录模块401 # # Step:1、进入标签分组402 # # Step:2、进入任意一个分组403 # # Step:3、勾选联系人,点击呼叫404 # cpg = CallPage()405 # Preconditions.enter_label_grouping_chat_page(False)406 # LableGroupDetailPage().click_multiparty_videos()407 # mppg = MultiPartyVideoPage()408 # time.sleep(1)409 # for i in range(3):410 # mppg.click_select_contacts(i)411 # mppg.click_tv_sure()412 # # CheckPoint:发起多方视频413 # time.sleep(1)414 # self.assertTrue(mppg.is_exist_end_video_call())415 # @tags('ALL', 'CMCC', 'Call')416 # def test_call_zhenyishan_0006(self):417 # """多方视频入口检查:标签分组-群发消息,wifi发起多方视频"""418 # # 1、wifi连接正常419 # # 2、当前为通讯录模块420 # # Step:1、进入标签分组421 # # Step:2、进入任意一个分组422 # # Step:3、点击群发消息423 # Preconditions.enter_label_grouping_chat_page()424 # cpg = CallPage()425 # # Step:4、勾选联系人,点击呼叫426 # gpg = GroupListPage()427 # gpg.click_mult_call_icon()428 # CallPage().click_mutil_video_call()429 # mppg = MultiPartyVideoPage()430 # for i in range(3):431 # mppg.click_contact_icon(i)432 # mppg.click_tv_sure()433 # time.sleep(1)434 # # CheckPoint:发起多方视频435 # if cpg.is_text_present("现在去开启"):436 # cpg.click_text("暂不开启")437 # time.sleep(1)438 # self.assertTrue(mppg.is_exist_end_video_call())439 # mppg.click_end_video_call()440 # mppg.click_btn_ok()441 # cpg.click_back_by_android(3)442 # cpg.click_call()443 #444 @staticmethod445 def setUp_test_call_zhenyishan_0007_001():446 # 关闭WiFi,打开4G网络447 warnings.simplefilter('ignore', ResourceWarning)448 Preconditions.make_already_in_call()449 CalllogBannerPage().skip_multiparty_call()450 CallPage().delete_all_call_entry()451 CallPage().set_network_status(4)452 @tags('ALL', 'CMCC', 'Call')453 def test_call_zhenyishan_0007_001(self):454 """未订购每月10G免流,使用移动网络发起多方视频,弹出每月10G免流特权提示窗口---普通群/企业群"""455 # 1、登录的手机号码未订购每月10G免流456 # 2、当前为移动网络连接457 # Step:1、消息模块 — 普通群/企业群 — 点击视频按钮 — 点击多方视频458 cpg = CallPage()459 mp = MessagePage()460 ContactsPage().click_message_icon()461 mp.wait_for_page_load()462 mp.click_add_icon()463 mp.click_group_chat()464 # 点击选择一个群465 scg = SelectContactsPage()466 scg.click_select_one_group()467 sog = SelectOneGroupPage()468 # 等待“选择一个群”页面加载469 sog.wait_for_page_load()470 # 选择一个普通群471 phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)[0]472 sog.selecting_one_group_by_name("Test_" + phone_number)473 # Step: 2、勾选2 - 8人,点击呼叫474 gpg = GroupListPage()475 gpg.click_mult_call_icon()476 CallPage().click_mutil_video_call()477 mppg = MultiPartyVideoPage()478 for i in range(3):479 mppg.click_contact_list_item(i)480 mppg.click_tv_sure()481 # CheckPoint:发起多方视频,弹出每月10G免流特权提示弹窗482 time.sleep(1)483 cpg.page_should_contain_text("每月10G免流特权")484 @staticmethod485 def tearDown_test_call_zhenyishan_0007_001():486 # 打开网络487 cpg = CallPage()488 cpg.set_network_status(6)489 preconditions.disconnect_mobile(REQUIRED_MOBILES['IOS-移动'])490 @staticmethod491 def setUp_test_call_zhenyishan_0007_002():492 # 关闭WiFi,打开4G网络493 warnings.simplefilter('ignore', ResourceWarning)494 Preconditions.make_already_in_call()495 CalllogBannerPage().skip_multiparty_call()496 CallPage().delete_all_call_entry()497 CallPage().set_network_status(4)498 @tags('ALL', 'CMCC', 'Call')499 def test_call_zhenyishan_0007_002(self):500 """未订购每月10G免流,使用移动网络发起多方视频,弹出每月10G免流特权提示窗口---通话模块 — 发起视频 — 勾选2--8人 — 点击呼叫"""501 # 1、登录的手机号码未订购每月10G免流502 # 2、当前为移动网络连接503 # Step:1、通话模块 — 发起视频 — 勾选2--8人 — 点击呼叫504 cpg = CallPage()505 cpg.click_multi_party_video()506 mppg = MultiPartyVideoPage()507 mppg.select_contacts_by_number("14775970982")508 mppg.select_contacts_by_number("13800138006")509 mppg.click_tv_sure()510 # CheckPoint:发起多方视频,弹出每月10G免流特权提示弹窗511 time.sleep(1)512 cpg.page_should_contain_text("每月10G免流特权")513 @staticmethod514 def tearDown_test_call_zhenyishan_0007_002():515 # 打开网络516 cpg = CallPage()517 cpg.set_network_status(6)518 preconditions.disconnect_mobile(REQUIRED_MOBILES['IOS-移动'])519 @staticmethod520 def setUp_test_call_zhenyishan_0007_003():521 # 关闭WiFi,打开4G网络522 warnings.simplefilter('ignore', ResourceWarning)523 Preconditions.make_already_in_call()524 CalllogBannerPage().skip_multiparty_call()525 CallPage().delete_all_call_entry()526 @tags('ALL', 'CMCC', 'Call')527 def test_call_zhenyishan_0007_003(self):528 """未订购每月10G免流,使用移动网络发起多方视频,弹出每月10G免流特权提示窗口---通话模块 — 通话记录列表 — 点击已有多方视频记录"""529 # 1、登录的手机号码未订购每月10G免流530 # 2、当前为移动网络连接531 # Step:1、通话模块 — 通话记录列表 — 点击已有多方视频记录532 self.test_call_zhenyishan_0002()533 # CheckPoint:发起多方视频534 cpg = CallPage()535 cpg.wait_for_call_page()536 CallPage().set_network_status(4)537 cpg.click_call_entry()538 # CheckPoint:发起多方视频,弹出每月10G免流特权提示弹窗539 time.sleep(1)540 cpg.page_should_contain_text("每月10G免流特权")541 @staticmethod542 def tearDown_test_call_zhenyishan_0007_003():543 # 打开网络544 cpg = CallPage()545 cpg.set_network_status(6)546 preconditions.disconnect_mobile(REQUIRED_MOBILES['IOS-移动'])547 @staticmethod548 def setUp_test_call_zhenyishan_0007_004():549 # 关闭WiFi,打开4G网络550 warnings.simplefilter('ignore', ResourceWarning)551 Preconditions.make_already_in_call()552 CalllogBannerPage().skip_multiparty_call()553 CallPage().delete_all_call_entry()554 @tags('ALL', 'CMCC', 'Call')555 def test_call_zhenyishan_0007_004(self):556 """未订购每月10G免流,使用移动网络发起多方视频,弹出每月10G免流特权提示窗口---通话模块 — 通话记录列表 — 点击已有多方视频记录右侧的“!”进入通话详情页 — 点击再次呼叫"""557 # 1、登录的手机号码未订购每月10G免流558 # 2、当前为移动网络连接559 # Step:1、通话模块 — 通话记录列表 — 点击已有多方视频记录右侧的“!”进入通话详情页 — 点击再次呼叫560 self.test_call_zhenyishan_0002()561 cpg = CallPage()562 cpg.wait_for_call_page()563 CallPage().set_network_status(4)564 cpg.click_dial()565 cpg.click_call_time_search_status()566 mppg = MultiPartyVideoPage()567 mppg.click_call_again()568 # CheckPoint:发起多方视频,弹出每月10G免流特权提示弹窗569 time.sleep(1)570 cpg.page_should_contain_text("每月10G免流特权")571 @staticmethod572 def tearDown_test_call_zhenyishan_0007_004():573 # 打开网络574 cpg = CallPage()575 cpg.set_network_status(6)576 preconditions.disconnect_mobile(REQUIRED_MOBILES['IOS-移动'])577 # @staticmethod578 # def setUp_test_call_zhenyishan_0007_005():579 # # 关闭WiFi,打开4G网络580 # Preconditions.make_already_in_call()581 # CalllogBannerPage().skip_multiparty_call()582 # CallPage().delete_all_call_entry()583 # CallPage().set_network_status(4)584 #585 # @tags('ALL', 'CMCC', 'Call')586 # def test_call_zhenyishan_0007_005(self):587 # """未订购每月10G免流,使用移动网络发起多方视频,弹出每月10G免流特权提示窗口---通讯录模块 — 标签分组 — 点击已新建分组 — 点击多方视频"""588 # # 1、登录的手机号码未订购每月10G免流589 # # 2、当前为移动网络连接590 # # Step:1、通讯录模块 — 标签分组 — 点击已新建分组 — 点击多方视频591 # cpg = CallPage()592 # Preconditions.enter_label_grouping_chat_page(False)593 # LableGroupDetailPage().click_multiparty_videos()594 # mppg = MultiPartyVideoPage()595 # time.sleep(1)596 # for i in range(3):597 # mppg.click_select_contacts(i)598 # mppg.click_tv_sure()599 # # CheckPoint:发起多方视频,弹出每月10G免流特权提示弹窗600 # time.sleep(1)601 # cpg.page_should_contain_text("每月10G免流特权")602 # cpg.click_back_by_android(4)603 #604 # @staticmethod605 # def tearDown_test_call_zhenyishan_0007_005():606 # # 打开网络607 # cpg = CallPage()608 # cpg.set_network_status(6)609 #610 # @staticmethod611 # def setUp_test_call_zhenyishan_0007_006():612 # # 关闭WiFi,打开4G网络613 # Preconditions.make_already_in_call()614 # CalllogBannerPage().skip_multiparty_call()615 # CallPage().delete_all_call_entry()616 # CallPage().set_network_status(4)617 #618 # @tags('ALL', 'CMCC', 'Call')619 # def test_call_zhenyishan_0007_006(self):620 # """未订购每月10G免流,使用移动网络发起多方视频,弹出每月10G免流特权提示窗口---通讯录模块—标签分组—点击已新建分组—群发消息—点击多方视频"""621 # # 1、登录的手机号码未订购每月10G免流622 # # 2、当前为移动网络连接623 # # Step:1、通讯录模块—标签分组—点击已新建分组—群发消息—点击多方视频624 # Preconditions.enter_label_grouping_chat_page()625 # cpg = CallPage()626 # # Step:4、勾选联系人,点击呼叫627 # gpg = GroupListPage()628 # gpg.click_mult_call_icon()629 # CallPage().click_mutil_video_call()630 # mppg = MultiPartyVideoPage()631 # for i in range(3):632 # mppg.click_contact_icon(i)633 # mppg.click_tv_sure()634 # # CheckPoint:发起多方视频,弹出每月10G免流特权提示弹窗635 # time.sleep(1)636 # cpg.page_should_contain_text("每月10G免流特权")637 # cpg.click_back_by_android(5)638 #639 # @staticmethod640 # def tearDown_test_call_zhenyishan_0007_006():641 # # 打开网络642 # cpg = CallPage()643 # cpg.set_network_status(6)644 #645 # @tags('ALL', 'CMCC', 'Call')646 # def test_call_zhenyishan_0038(self):647 # """普通群聊:多方视频联系人选择器搜索非群成员,检查页面显示"""648 # # 1、已通过群聊进入多方视频联系人选择器649 # # Step:1、在搜索框输入非群成员名称650 # cpg = CallPage()651 # mp = MessagePage()652 # ContactsPage().click_message_icon()653 # mp.wait_for_page_load()654 # mp.click_add_icon()655 # mp.click_group_chat()656 # # 点击选择一个群657 # scg = SelectContactsPage()658 # scg.click_select_one_group()659 # sog = SelectOneGroupPage()660 # # 等待“选择一个群”页面加载661 # sog.wait_for_page_load()662 # # 选择一个普通群663 # phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)[0]664 # sog.selecting_one_group_by_name("Test_" + phone_number)665 # gpg = GroupListPage()666 # gpg.click_mult_call_icon()667 # CallPage().click_mutil_video_call()668 # time.sleep(1)669 # SelectContactsPage().search("13800138001")670 # # CheckPoint:1、页面显示“无搜索结果”671 # cpg.page_should_contain_text("无搜索结果")672 # cpg.click_back_by_android(3)673 #674 # @tags('ALL', 'CMCC', 'Call')675 # def test_call_zhenyishan_0039(self):676 # """普通群聊:多方视频联系人选择器搜索群成员"""677 # # 1、已通过群聊进入多方视频联系人选择器678 # # Step:1、在搜索框输入群成员名称679 # cpg = CallPage()680 # mp = MessagePage()681 # ContactsPage().click_message_icon()682 # mp.wait_for_page_load()683 # mp.click_add_icon()684 # mp.click_group_chat()685 # # 点击选择一个群686 # scg = SelectContactsPage()687 # scg.click_select_one_group()688 # sog = SelectOneGroupPage()689 # # 等待“选择一个群”页面加载690 # sog.wait_for_page_load()691 # # 选择一个普通群692 # phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)[0]693 # sog.selecting_one_group_by_name("Test_" + phone_number)694 # gpg = GroupListPage()695 # gpg.click_mult_call_icon()696 # CallPage().click_mutil_video_call()697 # time.sleep(1)698 # SelectContactsPage().search("我")699 # time.sleep(1)700 # # CheckPoint:1、根据输入条件,搜索出群成员701 # cpg.page_should_contain_text("我")702 # # CheckPoint:2、搜索结果中,已匹配的内容高亮显示703 # # CheckPoint:3、点击可选中,并且清空输入内容704 # mppg = MultiPartyVideoPage()705 # mppg.click_contact_icon(0)706 # time.sleep(1)707 # cpg.page_should_contain_text("搜索成员")708 # cpg.click_back_by_android(2)709 #710 # @tags('ALL', 'CMCC', 'Call')711 # def test_call_zhenyishan_0053(self):712 # """从群聊发起多方视频,在多方视频管理界面点击“+”进入联系人选择页"""713 # # Step:1、从群聊发起多方视频714 # # Step:2、在多方视频管理界面点击“+”进入联系人选择页715 # # Step:3、检查联系人选择器716 # cpg = CallPage()717 # mp = MessagePage()718 # ContactsPage().click_message_icon()719 # mp.wait_for_page_load()720 # mp.click_add_icon()721 # mp.click_group_chat()722 # # 点击选择一个群723 # scg = SelectContactsPage()724 # scg.click_select_one_group()725 # sog = SelectOneGroupPage()726 # # 等待“选择一个群”页面加载727 # sog.wait_for_page_load()728 # # 选择一个普通群729 # phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)[0]730 # sog.selecting_one_group_by_name("Test_" + phone_number)731 # # Step: 2、勾选2 - 8人,点击呼叫732 # gpg = GroupListPage()733 # gpg.click_mult_call_icon()734 # CallPage().click_mutil_video_call()735 # mppg = MultiPartyVideoPage()736 # for i in range(3):737 # mppg.click_contact_icon(i)738 # mppg.click_tv_sure()739 # time.sleep(1)740 # if cpg.is_text_present("现在去开启"):741 # cpg.click_text("暂不开启")742 # time.sleep(1)743 # self.assertTrue(mppg.is_exist_end_video_call())744 # # CheckPoint:1、展示群成员列表745 # MutiVideoPage().click_multi_video_add_person()746 # cpg.page_should_contain_text(phone_number)747 # cpg.click_back_by_android()748 # if mppg.is_exist_end_video_call():749 # mppg.click_end_video_call()750 # cpg.click_back_by_android(2)751 #752 # @tags('ALL', 'CMCC', 'Call')753 # def test_call_zhenyishan_0057(self):754 # """通话模块:搜索栏--通过简/繁体中文搜索出结果"""755 # # 1、当前为多方视频联系人选择页756 # # 2、本地联系人中已有简体中文名称的联系人以及繁体中文名称的联系人757 # # Step:1、在输入框输入简体中文/繁体中文758 # cpg = CallPage()759 # cpg.click_multi_party_video()760 # # CheckPoint:1、根据输入条件,搜索出姓名中含有对应简/繁体字的结果761 # SelectContactsPage().search("测试号码")762 # time.sleep(1)763 # cpg.page_should_contain_text("14775970982")764 # mppg = MultiPartyVideoPage()765 # mppg.click_contact_icon(0)766 # time.sleep(1)767 # cpg.page_should_contain_text("搜索或输入号码")768 #769 # # CheckPoint:2、搜索结果中,已匹配的内容高亮显示770 # SelectContactsPage().search("繁體")771 # time.sleep(1)772 # cpg.page_should_contain_text("13800138020")773 # # CheckPoint:3、点击可选中,并且清空输入内容774 # mppg = MultiPartyVideoPage()775 # mppg.click_contact_icon(0)776 # time.sleep(1)777 # cpg.page_should_contain_text("搜索或输入号码")778 # cpg.click_back_by_android()779 #780 # @tags('ALL', 'CMCC', 'Call')781 # def test_call_zhenyishan_0058(self):782 # """通话模块:搜索栏--通过英文搜索出结果"""783 # # 1、当前为多方视频联系人选择页784 # # 2、本地联系人中已有英文名称的联系人785 # # Step:1、在输入框输入英文786 # cpg = CallPage()787 # cpg.click_multi_party_video()788 # # CheckPoint:1、根据输入条件,搜索出姓名中含有对应英文的结果789 # SelectContactsPage().search("特殊!@$")790 # time.sleep(1)791 # cpg.page_should_contain_text("13800138040")792 # # CheckPoint: 2、搜索结果中,已匹配的内容高亮显示793 # # CheckPoint: 3、点击可选中,并且清空输入内容794 # mppg = MultiPartyVideoPage()795 # mppg.click_contact_icon(0)796 # time.sleep(1)797 # cpg.page_should_contain_text("搜索或输入号码")798 # cpg.click_back_by_android()799 #800 # @tags('ALL', 'CMCC', 'Call')801 # def test_call_zhenyishan_0059(self):802 # """通话模块:搜索栏--通过数字搜索出结果"""803 # # 1、当前为多方视频联系人选择页804 # # 2、本地联系人中已有名称含有数字的联系人805 # # Step:1、在输入框输入数字806 # cpg = CallPage()807 # cpg.click_multi_party_video()808 # # CheckPoint:1、根据输入条件,搜索出姓名、手机号码中含有对应数字的结果809 # SelectContactsPage().search("大佬1")810 # time.sleep(1)811 # cpg.page_should_contain_text("13800138005")812 # # CheckPoint: 2、搜索结果中,已匹配的内容高亮显示813 # # CheckPoint: 3、点击可选中,并且清空输入内容814 # mppg = MultiPartyVideoPage()815 # mppg.click_contact_icon(0)816 # time.sleep(1)817 # cpg.page_should_contain_text("搜索或输入号码")818 # cpg.click_back_by_android()819 #820 # @tags('ALL', 'CMCC', 'Call')821 # def test_call_zhenyishan_0060(self):822 # """通话模块:搜索栏--通过数字搜索出结果"""823 # # 1、当前为多方视频联系人选择页824 # # 2、本地联系人中已有名称含有数字的联系人825 # # Step:1、在输入框输入数字826 # cpg = CallPage()827 # cpg.click_multi_party_video()828 # # CheckPoint:1、根据输入条件,搜索出姓名、手机号码中含有对应数字的结果829 # SelectContactsPage().search("大佬1")830 # time.sleep(1)831 # cpg.page_should_contain_text("13800138005")832 # # CheckPoint: 2、搜索结果中,已匹配的内容高亮显示833 # # CheckPoint: 3、点击可选中,并且清空输入内容834 # mppg = MultiPartyVideoPage()835 # mppg.click_contact_icon(0)836 # time.sleep(1)837 # cpg.page_should_contain_text("搜索或输入号码")838 # cpg.click_back_by_android()839 #840 # @tags('ALL', 'CMCC', 'Call')841 # def test_call_zhenyishan_0071(self):842 # """通话模块:进入多方视频联系人选择页,搜索出结果,搜索栏下方显示:【放大镜图标】搜索团队联系人:【搜索内容】 >,点击跳转到团队联系人搜索结果页面"""843 # # 1、当前为多方视频联系人选择页844 # # Step: 1、在输入框输入任意内容845 # cpg = CallPage()846 # cpg.click_multi_party_video()847 # # Step: 2、检查输入框下方848 # SelectContactsPage().search("大佬1")849 # time.sleep(1)850 # # CheckPoint:1、搜索栏下方显示:【放大镜图标】搜索团队联系人:【搜索内容】851 # # CheckPoint: 2、搜索超长内容时,后面...显示852 # cpg.page_should_contain_text("搜索团队联系人 : 大佬1")853 # # CheckPoint: 3、点击跳转到团队联系人搜索结果页面854 # SelectContactsPage().click_search_he_contact()855 # time.sleep(1)856 # cpg.page_should_contain_text("团队联系人")857 # cpg.click_back_by_android(3)858 #859 # @tags('ALL', 'CMCC', 'Call')860 # def test_call_zhenyishan_0073(self):861 # """通话模块:进入多方视频联系人选择页,检查【选择团队联系人】入口"""862 # # 1、当前为多方视频联系人选择页863 # # 2、用户已加入企业864 # # Step: 1、点击【选择团队联系人】865 # cpg = CallPage()866 # cpg.click_multi_party_video()867 # # CheckPoint:1、跳转团队联系人选择页868 # SelectContactsPage().click_search_he_contact()869 # time.sleep(1)870 # cpg.page_should_contain_text("选择联系人")871 # cpg.click_back_by_android(2)872 #873 # @tags('ALL', 'CMCC', 'Call')874 # def test_call_zhenyishan_0076(self):875 # """通话模块:检查团队联系人选择页的页面显示"""876 # # 1、当前为团队联系人选择页877 # # Step: 1、检查页面显示878 # cpg = CallPage()879 # cpg.click_multi_party_video()880 # SelectContactsPage().click_search_he_contact()881 # time.sleep(1)882 # # CheckPoint:1、返回按钮883 # mppg = MultiPartyVideoPage()884 # self.assertTrue(mppg.is_exist_back_button())885 #886 # # CheckPoint:2、标题:选择联系人887 # cpg.page_should_contain_text("选择联系人")888 #889 # # CheckPoint:3、搜索栏内置灰显示“搜索或输入手机号”890 # cpg.page_should_contain_text("搜索或输入手机号")891 #892 # # CheckPoint:4、呼叫按钮,置灰显示893 # # CheckPoint:5、企业层级显示894 # self.assertFalse(mppg.is_enabled_tv_sure())895 #896 # @tags('ALL', 'CMCC', 'Call')897 # def test_call_zhenyishan_0080(self):898 # """通话模块:团队联系人选择页搜索栏--通过中文搜索出结果"""899 # # 1、当前为团队联系人选择页900 # # 2、团队中已有简体中文名称的联系人以及繁体中文名称的联系人901 # # Step: 1、在输入框输入简体中文/繁体中文902 # cpg = CallPage()903 # cpg.click_multi_party_video()904 # SelectContactsPage().click_search_he_contact()905 # time.sleep(1)906 # # CheckPoint:1、根据搜索条件,搜索出姓名、公司名称中含有对应中文的联系人907 # # CheckPoint:2、规则:中文完全匹配>前部匹配>后部匹配908 # # 完全匹配909 # SelectContactsPage().search("大佬1")910 # cpg.page_should_contain_text("大佬1")911 # cpg.page_should_not_contain_text("大佬2")912 # cpg.page_should_not_contain_text("大佬3")913 # cpg.page_should_not_contain_text("大佬4")914 #915 # # 部分匹配916 # SelectContactsPage().search("大佬")917 # cpg.page_should_contain_text("大佬1")918 # cpg.page_should_contain_text("大佬2")919 # cpg.page_should_contain_text("大佬3")920 # cpg.page_should_contain_text("大佬4")921 # # 先显示前半部分匹配,后显示后半部匹配922 # cpg.page_should_not_contain_text("香港大佬")923 #924 # # CheckPoint:3、搜索结果中,已匹配的内容高亮显示925 # # CheckPoint:4、点击可选中,并且清空输入内容926 # cpg.click_text("大佬1")927 # cpg.page_should_contain_text("搜索或输入手机号")928 # cpg.click_back_by_android(2)929 #930 # @tags('ALL', 'CMCC', 'Call')931 # def test_call_zhenyishan_0081(self):932 # """通话模块:团队联系人选择页搜索栏--通过字母搜索出结果"""933 # # 1、当前为团队联系人选择页934 # # 2、团队中已有英文名称的联系人935 # # Step: 1、在输入框输入英文936 # cpg = CallPage()937 # cpg.click_multi_party_video()938 # SelectContactsPage().click_search_he_contact()939 # time.sleep(1)940 # # CheckPoint:1、根据搜索条件,搜索出姓名、公司名称中含有对应字母的联系人941 # # CheckPoint:2、优先级:拼音>首字母942 # # CheckPoint:3、规则:完全匹配>前部匹配>后部匹配943 # # 完全匹配944 # SelectContactsPage().search("English")945 # cpg.page_should_contain_text("English")946 # cpg.page_should_not_contain_text("Lily")947 #948 # # 部分匹配排序949 # SelectContactsPage().search("li")950 # mppg = MultiPartyVideoPage()951 # time.sleep(2)952 # self.assertTrue("Lily" == mppg.get_img_icon_contactlist(0))953 # self.assertTrue("English" == mppg.get_img_icon_contactlist(1))954 #955 # # CheckPoint:4、搜索结果中,已匹配的内容高亮显示956 # # CheckPoint:5、点击可选中,并且清空输入内容957 # cpg.click_text("English")958 # cpg.page_should_contain_text("搜索或输入手机号")959 # cpg.click_back_by_android(2)960 #961 # @tags('ALL', 'CMCC', 'Call')962 # def test_call_zhenyishan_0082(self):963 # """通话模块:团队联系人选择页搜索栏--通过数字搜索出结果"""964 # # 1、当前为团队联系人选择页965 # # 2、团队中已有名称含有数字的联系人966 # # Step: 1、在输入框输入数字967 # cpg = CallPage()968 # cpg.click_multi_party_video()969 # SelectContactsPage().click_search_he_contact()970 # time.sleep(1)971 # # CheckPoint:1、根据搜索条件,搜索出姓名、手机号码中含有对应数字的结果972 # # CheckPoint:2、优先级:手机>姓名>其它号码(含固话、短号)973 # # CheckPoint:3、规则:>=6位展示搜索结果(短号除外)974 # SelectContactsPage().search("大佬1")975 # cpg.page_should_contain_text("大佬1")976 # cpg.page_should_contain_text("13800138005")977 #978 # # CheckPoint:4、结果:高亮匹配搜索数字,按所有搜索结果姓名首字母A-Z排序979 # # CheckPoint:5、点击可选中,并且清空输入内容980 # cpg.click_text("大佬1")981 # cpg.page_should_contain_text("搜索或输入手机号")982 # cpg.click_back_by_android(2)983 #984 # @tags('ALL', 'CMCC', 'Call')985 # def test_call_zhenyishan_0083(self):986 # """通话模块:团队联系人选择页搜索栏--通过特殊字符搜索出结果"""987 # # 1、当前为团队联系人选择页988 # # 2、团队中已有名称含有特殊字符的联系人989 # # Step: 1、在输入框输入特殊字符990 # cpg = CallPage()991 # cpg.click_multi_party_video()992 # SelectContactsPage().click_search_he_contact()993 # time.sleep(1)994 # # CheckPoint:1、根据搜索条件,搜索出姓名、公司名称中含有对应特殊符号的结果995 # # CheckPoint:2、规则:>=2位字符,支持"+",“.”等组合搜索996 # # CheckPoint:3、优先级:完全匹配>前部匹配>后部匹配997 # SelectContactsPage().search("特殊!@$")998 # cpg.page_should_contain_text("特殊!@$")999 # cpg.page_should_contain_text("13800138040")1000 #1001 # # CheckPoint:4、结果:高亮匹配特殊字符组合。按所有搜索结果姓名首字母A-Z排序1002 # # CheckPoint:5、点击可选中,并且清空输入内容1003 # cpg.click_text("特殊!@$")1004 # cpg.page_should_contain_text("搜索或输入手机号")1005 # cpg.click_back_by_android(2)1006 #1007 # @tags('ALL', 'CMCC', 'Call')1008 # def test_call_zhenyishan_0087(self):1009 # """通话模块:团队联系人选择页搜索栏--搜索本机号码"""1010 # # 1、当前为团队联系人选择页1011 # # Step: 1、在输入框输入本机号码1012 # cpg = CallPage()1013 # cpg.click_multi_party_video()1014 # SelectContactsPage().click_search_he_contact()1015 # time.sleep(1)1016 # # CheckPoint:1、默认置灰不可选1017 # # CheckPoint:2、点击则toast提示:该联系人不可选择1018 # phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)[0]1019 # SelectContactsPage().search(phone_number)1020 # MultiPartyVideoPage().click_img_icon_contactlist()1021 # self.assertTrue(cpg.is_toast_exist("该联系人不可选择"))1022 # cpg.click_back_by_android(2)1023 #1024 # @tags('ALL', 'CMCC', 'Call')1025 # def test_call_zhenyishan_0096(self):1026 # """通话模块:检查企业入口"""1027 # # 1、当前为团队联系人选择页1028 # # 2、本机用户已加入企业1029 # # Step: 1、点击企业名称1030 # cpg = CallPage()1031 # cpg.click_multi_party_video()1032 # SelectContactsPage().click_search_he_contact()1033 # time.sleep(1)1034 # # CheckPoint:1、搜索栏内置灰显示“当前组织”1035 # cpg.page_should_contain_text("当前组织")1036 # # CheckPoint:2、展示该列表下的用户1037 # cpg.page_should_contain_text("本机")1038 # phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)[0]1039 # cpg.page_should_contain_text(phone_number)1040 # # CheckPoint:3、展示该列表下的分组1041 # # CheckPoint:4、顶端显示企业导航栏面包屑,点击跳转到对应的列表1042 # cpg.click_back_by_android(2)1043 #1044 # @tags('ALL', 'CMCC', 'Call')1045 # def test_call_zhenyishan_0100(self):1046 # """通话模块:部门级搜索--搜索部门下的用户"""1047 # # 1、当前为团队联系人选择页1048 # # 2、已点击进入企业下的部门分组1049 # # Step: 1、搜索当前部门下的用户1050 # cpg = CallPage()1051 # cpg.click_multi_party_video()1052 # SelectContactsPage().click_search_he_contact()1053 # time.sleep(1)1054 # # CheckPoint:1、根据搜索结果展示对方姓名、手机号码、部门分组1055 # SelectContactsPage().search("大佬1")1056 # time.sleep(1)1057 # cpg.page_should_contain_text("13800138005")1058 # cpg.page_should_contain_text("测试部门1")1059 # # CheckPoint:2、点击可选中,并且清空输入内容1060 # cpg.click_text("13800138005")1061 # cpg.page_should_contain_text("搜索或输入手机号")1062 # cpg.click_back_by_android(2)1063 #1064 # @tags('ALL', 'CMCC', 'Call')1065 # def test_call_zhenyishan_0105(self):1066 # """通话模块:点击团队联系人,检查联系人状态显示"""1067 # # 1、当前为团队联系人选择页1068 # # 2、已点击进入企业下的部门分组1069 # # Step: 1、点击任意团队联系人1070 # cpg = CallPage()1071 # cpg.click_multi_party_video()1072 # SelectContactsPage().click_search_he_contact()1073 # time.sleep(1)1074 # # CheckPoint:1、对应联系人显示勾选状态,头相处显示“√”1075 # cpg.click_text("ateam3465")1076 # cpg.click_text("大佬1")1077 # # CheckPoint:2、搜索框显示已添加联系人1078 # SelectLocalContactsPage().is_exist_select_contacts_name()1079 # # CheckPoint:3、右上角“呼叫”按钮,数字发生变化,并且由置灰变为可点击1080 # cpg.page_should_contain_text("呼叫(1/8)")1081 # self.assertTrue(SelectCompanyContactsPage().sure_button_is_enabled())1082 # cpg.click_back_by_android(2)1083 #1084 # @tags('ALL', 'CMCC', 'Call')1085 # def test_call_zhenyishan_0119(self):1086 # """通话模块:点击本地通讯录联系人,检查联系人状态显示"""1087 # # 1、当前为多方视频联系人选择页1088 # # Step: 1、点击任意本地通讯录联系人1089 # cpg = CallPage()1090 # cpg.click_multi_party_video()1091 # time.sleep(1)1092 # # CheckPoint:1、对应联系人显示勾选状态,头相处显示“√”1093 # cpg.click_text("大佬1")1094 # time.sleep(1)1095 # # CheckPoint:2、搜索框显示已添加联系人1096 # SelectLocalContactsPage().is_exist_select_contacts_name()1097 # # CheckPoint:3、右上角“呼叫”按钮,数字发生变化,并且由置灰变为可点击1098 # cpg.page_should_contain_text("呼叫(1/8)")1099 # self.assertTrue(MultiPartyVideoPage().sure_button_is_enabled())1100 # cpg.click_back_by_android(2)1101 #1102 # @tags('ALL', 'CMCC', 'Call')1103 # def test_call_zhenyishan_0127(self):1104 # """通话模块:仅勾选本地联系人,发起多方视频"""1105 # # 1、当前为多方视频联系人选择页1106 # # Step: 1、仅勾选本地联系人,点击呼叫发起多方视频1107 # cpg = CallPage()1108 # cpg.click_multi_party_video()1109 # time.sleep(1)1110 # # CheckPoint:1、正常发起多方视频1111 # mppg = MultiPartyVideoPage()1112 # mppg.select_contacts_by_number("14775970982")1113 # mppg.select_contacts_by_number("13800138005")1114 # mppg.select_contacts_by_number("13800138006")1115 # mppg.click_tv_sure()1116 # time.sleep(1)1117 # if cpg.is_text_present("现在去开启"):1118 # cpg.click_text("暂不开启")1119 # time.sleep(1)1120 # self.assertTrue(mppg.is_exist_end_video_call())1121 # mppg.click_end_video_call()1122 # mppg.click_btn_ok()1123 # time.sleep(1)1124 # cpg.click_back_by_android(2)1125 #1126 # @tags('ALL', 'CMCC', 'Call')1127 # def test_call_zhenyishan_0128(self):1128 # """通话模块:仅勾选和通讯录联系人,发起多方视频"""1129 # # 1、当前为多方视频联系人选择页1130 # # Step: 1、点击进入和通讯录1131 # # Step: 2、勾选和通讯录联系人,点击呼叫发起多方视频1132 # cpg = CallPage()1133 # cpg.click_multi_party_video()1134 # time.sleep(1)1135 # # CheckPoint:1、正常发起多方视频1136 # mppg = MultiPartyVideoPage()1137 # SelectContactsPage().click_search_he_contact()1138 # time.sleep(1)1139 # cpg.click_text("ateam3465")1140 # time.sleep(1)1141 # cpg.click_text("大佬1")1142 # time.sleep(1)1143 # cpg.click_text("大佬2")1144 # time.sleep(1)1145 # cpg.click_text("大佬3")1146 # time.sleep(1)1147 # cpg.click_back_by_android(2)1148 # mppg.click_tv_sure()1149 # time.sleep(1)1150 # if cpg.is_text_present("现在去开启"):1151 # cpg.click_text("暂不开启")1152 # time.sleep(1)1153 # self.assertTrue(mppg.is_exist_end_video_call())1154 # mppg.click_end_video_call()1155 # mppg.click_btn_ok()1156 # time.sleep(1)1157 # cpg.click_back_by_android(2)1158 #1159 # @tags('ALL', 'CMCC', 'Call')1160 # def test_call_zhenyishan_0129(self):1161 # """通话模块:仅勾选陌生联系人,可发起多方视频"""1162 # # 1、当前为多方视频联系人选择页1163 # # Step: 1、通过搜索栏搜索出2-8个陌生联系人并且选中1164 # # Step: 2、点击呼叫发起多方视频1165 # cpg = CallPage()1166 # cpg.click_multi_party_video()1167 # time.sleep(1)1168 # # CheckPoint:1、正常发起多方视频1169 # mppg = MultiPartyVideoPage()1170 # SelectContactsPage().search("13800139000")1171 # mppg.click_contact_list_item()1172 # SelectContactsPage().search("13800139001")1173 # mppg.click_contact_list_item()1174 # SelectContactsPage().search("13800139002")1175 # mppg.click_contact_list_item()1176 # mppg.click_tv_sure()1177 # time.sleep(1)1178 # if cpg.is_text_present("现在去开启"):1179 # cpg.click_text("暂不开启")1180 # time.sleep(1)1181 # self.assertTrue(mppg.is_exist_end_video_call())1182 # mppg.click_end_video_call()1183 # mppg.click_btn_ok()1184 # time.sleep(1)1185 # cpg.click_back_by_android(2)1186 #1187 # @tags('ALL', 'CMCC', 'Call')1188 # def test_call_zhenyishan_0130(self):1189 # """通话模块:勾选本地联系人+和通讯录联系人+陌生联系人,发起多方视频"""1190 # # 1、当前为多方视频联系人选择页1191 # cpg = CallPage()1192 # cpg.click_multi_party_video()1193 # time.sleep(1)1194 # # Step: 1、通过搜索栏搜索出1个陌生联系人并且选中1195 # mppg = MultiPartyVideoPage()1196 # SelectContactsPage().search("13800139000")1197 # mppg.click_contact_list_item()1198 # # Step: 2、点击进入和通讯录,选中1个和通讯录联系人1199 # SelectContactsPage().click_search_he_contact()1200 # time.sleep(1)1201 # cpg.click_text("ateam3465")1202 # time.sleep(1)1203 # cpg.click_text("大佬1")1204 # time.sleep(1)1205 # cpg.click_back_by_android(2)1206 # # Step: 3、在本地通讯录选中1个联系人1207 # mppg.select_contacts_by_number("14775970982")1208 # # Step: 4、点击呼叫发起多方视频1209 # mppg.click_tv_sure()1210 # # CheckPoint:1、正常发起多方视频1211 # time.sleep(1)1212 # if cpg.is_text_present("现在去开启"):1213 # cpg.click_text("暂不开启")1214 # time.sleep(1)1215 # self.assertTrue(mppg.is_exist_end_video_call())1216 # mppg.click_end_video_call()1217 # mppg.click_btn_ok()1218 # time.sleep(1)1219 # cpg.click_back_by_android(2)1220 #1221 # @tags('ALL', 'CMCC', 'Call')1222 # def test_call_zhenyishan_0145(self):1223 # """分组群发/标签分组/群发消息:多方视频联系人选择器搜索群成员"""1224 # # 1、已通过分组群发/标签分组/群发消息进入多方视频联系人选择器1225 # cpg = CallPage()1226 # Preconditions.enter_label_grouping_chat_page()1227 # gpg = GroupListPage()1228 # gpg.click_mult_call_icon()1229 # CallPage().click_mutil_video_call()1230 # # Step: 1、在搜索框输入标签分组成员名称1231 # GroupListPage().search_menber_text("大佬1")1232 #1233 # # CheckPoint:1、根据输入条件,搜索出标签分组成员1234 # cpg.page_should_contain_text("13800138005")1235 #1236 # # CheckPoint:2、搜索结果中,已匹配的内容高亮显示1237 # # CheckPoint:3、点击可选中,并且清空输入内容1238 # mppg = MultiPartyVideoPage()1239 # mppg.click_contact_head()1240 # time.sleep(1)1241 # cpg.page_should_contain_text("搜索标签分组成员")1242 # cpg.click_back_by_android(4)1243 # cpg.click_call()1244 #1245 # @tags('ALL', 'CMCC', 'Call')1246 # def test_call_zhenyishan_0155(self):1247 # """分组群发/标签分组/群发消息:发起多方视频,在管理页面点击“+”进入标签分组联系人选择页"""1248 # # Step: 1、通过分组群发/标签分组/群发消息发起多方视频1249 # cpg = CallPage()1250 # Preconditions.enter_label_grouping_chat_page()1251 # gpg = GroupListPage()1252 # gpg.click_mult_call_icon()1253 # CallPage().click_mutil_video_call()1254 # time.sleep(1)1255 # cpg.click_text("大佬1")1256 # time.sleep(1)1257 # cpg.click_text("给个红包1")1258 # time.sleep(1)1259 # mppg = MultiPartyVideoPage()1260 # mppg.click_tv_sure()1261 # time.sleep(1)1262 # if cpg.is_text_present("现在去开启"):1263 # cpg.click_text("暂不开启")1264 # time.sleep(1)1265 # self.assertTrue(mppg.is_exist_end_video_call())1266 #1267 # # Step: 2、在多方视频管理页面点击“+”进入联系人选择页1268 # MutiVideoPage().click_multi_video_add_person()1269 #1270 # # CheckPoint:1、联系人选择页显示标签分组成员1271 # cpg.page_should_contain_text("搜索标签分组成员")1272 # cpg.click_back_by_android()1273 # if mppg.is_exist_end_video_call():1274 # mppg.click_end_video_call()1275 # cpg.click_back_by_android(3)1276 # cpg.click_call()1277 #1278 # @tags('ALL', 'CMCC', 'Call')1279 # def test_call_zhenyishan_0158(self):1280 # """多方视频管理页面,检查免提按钮"""1281 # # 1、已成功发起多方视频1282 # # 2、当前为多方视频管理界面1283 # # Step: 1、点击免提按钮1284 # cpg = CallPage()1285 # cpg.click_multi_party_video()1286 # mppg = MultiPartyVideoPage()1287 # mppg.select_contacts_by_number("14775970982")1288 # mppg.select_contacts_by_number("13800138006")1289 # mppg.click_tv_sure()1290 # time.sleep(1)1291 # if cpg.is_exist_go_on():1292 # cpg.click_go_on()1293 # MutiVideoPage().wait_for_and_click_not_open()1294 # time.sleep(2)1295 # # CheckPoint:1、默认为开启状态1296 # self.assertTrue(MutiVideoPage().is_selected_mutil_video_call_speaker_btn())1297 # # CheckPoint:2、当前为开启状态:点击按钮,按钮变为关闭状态,按钮置灰,视频通话声音从手机听筒播放1298 # MutiVideoPage().click_mutil_video_call_speaker_btn()1299 # time.sleep(2)1300 # self.assertFalse(MutiVideoPage().is_selected_mutil_video_call_speaker_btn())1301 # # CheckPoint:3、当前为关闭状态:点击按钮,按钮变为开启状态,按钮高亮,视频通话声音从手机外放播放1302 # MutiVideoPage().click_mutil_video_call_speaker_btn()1303 # time.sleep(2)1304 # self.assertTrue(MutiVideoPage().is_selected_mutil_video_call_speaker_btn())1305 #1306 # @tags('ALL', 'CMCC', 'Call')1307 # def test_call_zhenyishan_0159(self):1308 # """多方视频管理页面,检查免提按钮"""1309 # # 1、已成功发起多方视频1310 # # 2、当前为多方视频管理界面1311 # # Step: 1、点击静音按钮1312 # cpg = CallPage()1313 # cpg.click_multi_party_video()1314 # mppg = MultiPartyVideoPage()1315 # mppg.select_contacts_by_number("14775970982")1316 # mppg.select_contacts_by_number("13800138006")1317 # mppg.click_tv_sure()1318 # time.sleep(1)1319 # if cpg.is_exist_go_on():1320 # cpg.click_go_on()1321 # MutiVideoPage().wait_for_and_click_not_open()1322 # time.sleep(2)1323 # # CheckPoint:1、默认为开启状态1324 # self.assertTrue(MutiVideoPage().is_selected_mutil_video_call_mute())1325 # # CheckPoint:2、当前为开启状态:点击按钮,按钮变为关闭状态按钮置灰,本机说话,对方能听到本机声音1326 # MutiVideoPage().click_mutil_video_call_mute()1327 # time.sleep(2)1328 # self.assertFalse(MutiVideoPage().is_selected_mutil_video_call_mute())1329 # # CheckPoint:3、当前为关闭状态:点击按钮,按钮变为开启状态,按钮高亮,本机说话,对方不能听到本机声音1330 # MutiVideoPage().click_mutil_video_call_mute()1331 # time.sleep(2)1332 # self.assertTrue(MutiVideoPage().is_selected_mutil_video_call_mute())1333 #1334 # @tags('ALL', 'CMCC', 'Call')1335 # def test_call_zhenyishan_0200(self):1336 # """检查多方视频通话记录详情页入口"""1337 # # 1、通话记录列表已有多方视频记录1338 # # Step: 1、点击多方视频通话记录右侧“!”1339 # self.test_call_zhenyishan_0002()1340 # cpg = CallPage()1341 # cpg.click_call_time()1342 # # CheckPoint:1、进入多方视频通话记录详情页1343 # cpg.page_should_contain_text("再次呼叫")1344 # cpg.page_should_contain_text("多方视频")1345 # cpg.click_back_by_android()1346 #1347 # @tags('ALL', 'CMCC', 'Call')1348 # def test_call_zhenyishan_0204(self):1349 # """多方视频通话记录详情页,检查一键建群按钮"""1350 # # 1、当前为多方视频通话记录详情页1351 # # Step: 1、点击一键建群按钮1352 # self.test_call_zhenyishan_0002()1353 # cpg = CallPage()1354 # cpg.click_call_time()1355 # # CheckPoint:1、跳转到群聊名称设置页面1356 # mppg = MultiPartyVideoPage()1357 # mppg.click_one_key_new_group()1358 # time.sleep(1)1359 # cpg.page_should_contain_text("群聊名称")1360 # cpg.click_back_by_android(2)1361 #1362 # @tags('ALL', 'CMCC', 'Call')1363 # def test_call_zhenyishan_0207(self):1364 # """多方视频通话记录详情页,点击一键建群,进入群聊名称设置页面,检查创建按钮"""1365 # # 1、当前为设置群聊名称页面1366 # # Step: 1、群聊名称为空时点击创建按钮1367 # # Step: 2、输入群聊名称后点击创建按钮1368 # self.test_call_zhenyishan_0002()1369 # cpg = CallPage()1370 # cpg.click_call_time()1371 # mppg = MultiPartyVideoPage()1372 # mppg.click_one_key_new_group()1373 # time.sleep(1)1374 # cpg.page_should_contain_text("群聊名称")1375 # # CheckPoint:1、未有群聊名称:置灰不可点击1376 # BuildGroupChatPage().click_clear_button()1377 # time.sleep(1)1378 # self.assertFalse(BuildGroupChatPage().is_enabled_tv_sure())1379 # # CheckPoint:2、已有群聊名称:高亮显示,点击跳转到群聊窗口,并且向多方视频成员发起进群邀请1380 # BuildGroupChatPage().input_group_chat_name("多方通话群聊")1381 # BuildGroupChatPage().click_ok()1382 # cpg.wait_until(timeout=5, auto_accept_permission_alert=True,1383 # condition=lambda d: cpg.is_text_present("你向"))1384 # cpg.page_should_contain_text("发出群邀请")1385 # cpg.page_should_contain_text("多方通话群聊")1386 # cpg.click_back_by_android(2)...

Full Screen

Full Screen

call_all.py

Source:call_all.py Github

copy

Full Screen

...157 # Step:1.点击通话tab158 cpg = CallPage()159 cpg.click_dial()160 # CheckPoint:1.进入到通话记录列表界面,底部“通话”按钮变成“拨号盘”,拨号盘按钮显示9蓝点161 cpg.page_should_contain_text('拨号')162 cpg.page_should_contain_text("直接拨号或开始搜索")163 cpg.click_dial()164 @tags('ALL', 'CMCC', 'Call', "ios")165 def test_call_shenlisi_0004(self):166 """检查拨号盘展开"""167 cpg = CallPage()168 # Step:1.点击“拨号盘"按钮169 cpg.click_dial()170 # CheckPoint:1.拨号盘展示,输入框提示“直接拨号或者开始搜索”,菜单栏被隐藏171 cpg.page_should_contain_text('直接拨号或开始搜索')172 cpg.click_dial()173 @tags('ALL', 'CMCC', 'Call', "ios")174 def test_call_shenlisi_0006(self):175 """检查展开拨号盘,通话记录为空"""176 # Step:1.查看通话记录177 cpg = CallPage()178 # CheckPoint:1.页面中间显示图片以及提示语179 cpg.page_should_contain_text("高清通话,高效沟通")180 cpg.page_should_contain_text('飞信电话')181 @tags('ALL', 'CMCC', 'Call', "ios")182 def test_call_shenlisi_0007(self):183 """检查拨号盘按键可点击"""184 cpg = CallPage()185 cpg.click_dial()186 # Step:1.点击按键“1”187 cpg.click_one()188 # Step:2.点击按键“2”189 cpg.click_two()190 # Step:3.点击按键“3”191 cpg.click_three()192 # Step:4.点击按键“4”193 cpg.click_four()194 # Step:5.点击按键“5”195 cpg.click_five()196 # Step:6.点击按键“6”197 cpg.click_six()198 # Step:7.点击按键“7”199 cpg.click_seven()200 # Step:8.点击按键“8”201 cpg.click_eight()202 # Step:9.点击按键“9”203 cpg.click_nine()204 # Step:10.点击按键“0”205 cpg.click_zero()206 # Step:11.点击按键“*”207 cpg.click_star()208 # Step:12.点击按键“#”209 cpg.click_sharp()210 # CheckPoint:1.步骤1-12:拨号盘各键输入正常211 cpg.page_should_contain_text("1234567890*#")212 @tags('ALL', 'CMCC', 'Call', "ios")213 def test_call_shenlisi_0008(self):214 """检查在拨号盘输入“+”"""215 # Step:1.检查在拨号盘输入“+”216 cpg = CallPage()217 cpg.click_dial()218 time.sleep(1)219 cpg.press_zero()220 # CheckPoint:1.展开后,通话记录按最近通话顺序展示221 cpg.page_should_contain_text("+")222 @tags('ALL', 'CMCC', 'Call', "ios")223 def test_call_shenlisi_0009(self):224 """检查输入框有内容时拨号盘可切换到其它模块"""225 # Step:1.切换至其它模块后又返回到拨号盘226 cpg = CallPage()227 cpg.click_dial()228 cpg.dial_number("15343030000")229 time.sleep(1)230 # CheckPoint:1.收起时切换到其他的模块,内容不清除,正常显示231 cpg.page_should_contain_text("15343030000")232 # Step:2. 切换为消息233 cpg.click_message()234 time.sleep(2)235 # CheckPoint:2.收起时切换到其他的模块,内容不清除,正常显示236 cpg.page_should_not_contain_text("15343030000")237 # Step:3. 切换为拨号盘238 cpg.click_call()239 # CheckPoint:3.收起时切换到其他的模块,内容不清除,正常显示240 cpg.page_should_contain_text("15343030000")241 @tags('ALL', 'CMCC', 'Call', "ios")242 def test_call_shenlisi_0010(self):243 """检查拨号盘删除按键可点击"""244 # 1.和飞信登录系统:通话tab245 # 2.拨号盘输入框存在手机号246 cpg = CallPage()247 cpg.click_dial()248 cpg.dial_number("15343038860")249 # Step:1.点击按键“X”250 cpg.click_delete()251 # CheckPoit:1.可删除输入框的数据252 cpg.page_should_contain_text("1534303886")253 # Step:2.长按“X”254 cpg.press_delete()255 # CheckPoit:2.连续删除输入框的数据256 cpg.page_should_contain_text("直接拨号或开始搜索")257 cpg.click_dial()258 @tags('ALL', 'CMCC', 'Call', "ios")259 def test_call_shenlisi_0011(self):260 """检查拨号盘“多方电话”按键可点击"""261 # Step:1.点击按键“多方电话”262 cpg = CallPage()263 cpg.click_feixin_call()264 time.sleep(2)265 # CheckPoint:1.调起联系人多方电话联系人选择器266 self.assertTrue(CalllogBannerPage().is_exist_contact_search_bar())267 @tags('ALL', 'CMCC', 'Call', "ios")268 def test_call_shenlisi_0012(self):269 """检查拨号盘输入框为空点击“拨打”按钮"""270 # 1.和飞信登录系统:通话tab271 # 2.拨号盘为展开状态272 # 3.拨号盘输入框为空273 cpg = CallPage()274 cpg.click_dial()275 time.sleep(2)276 # Step:1.点击“拨号”按钮277 cpg.click_call_phone()278 time.sleep(1)279 # # CheckPoint:1.提示“拨打号码不能为空”280 # flag = cpg.is_toast_exist("拨打的号码不能为空")281 # self.assertTrue(flag)282 cpg.page_should_contain_text("号码不能为空")283 cpg.click_dial()284 @tags('ALL', 'CMCC', 'Call', "ios")285 def test_call_shenlisi_0013(self):286 """检查拨号盘展开状态可收起"""287 # 1.和飞信登录系统:通话tab288 # 2.拨号盘为展开状态289 cpg = CallPage()290 # Step:1.点击拨号盘按钮291 cpg.click_dial()292 time.sleep(1)293 # CheckPoint:1.拨号盘可收起展开,拨号盘图标变为7个蓝点294 self.assertTrue(cpg.is_on_the_dial_pad())295 cpg.click_dial()296 @tags('ALL', 'CMCC', 'Call', "ios")297 def test_call_shenlisi_0014(self):298 """检查输入框有内容可收起拨号盘"""299 # 1.和飞信登录系统:通话tab300 # 2.拨号盘为展开状态301 # 3.拨号盘存在数值302 cpg = CallPage()303 cpg.click_dial()304 cpg.dial_number("153")305 # Step:1点击拨号盘按钮306 cpg.click_dial()307 # CheckPoint:1.拨号盘可收起展开,收起展开内容保留不清除,正常显示308 flag = cpg.check_delete_hide()309 self.assertTrue(flag)310 cpg.page_should_contain_text("153")311 @tags('ALL', 'CMCC', 'Call', "ios")312 def test_call_shenlisi_0015(self):313 """检查输入框有内容收起拨号盘可切换到其它模块"""314 # 1.和飞信登录系统:通话tab315 # 2.拨号盘为收起展开状态316 # 3.拨号盘存在数值317 cpg = CallPage()318 cpg.click_dial()319 cpg.dial_number("153")320 # Step:1.切换至其它模块后又返回到拨号盘321 cpg.click_message()322 flag = cpg.check_call_phone()323 self.assertFalse(flag)324 cpg.click_call()325 # CheckPoint:1.拨号盘可收起展开,收起展开内容保留不清除,正常显示326 flag = cpg.check_call_phone()327 self.assertTrue(flag)328 cpg.page_should_contain_text("153")329 @tags('ALL', 'CMCC', 'Call', "ios")330 def test_call_shenlisi_0020(self):331 """检查输入框输入超长数字"""332 # 1.和飞信登录系统:通话tab333 # 2.拨号盘展开状态334 # 3.拨号盘存在超长数值(数值超一行)335 cpg = CallPage()336 cpg.click_dial()337 cpg.dial_number("153153153153153")338 # Step:1.查看输入框样式339 # CheckPoint:1.显示正常340 time.sleep(1)341 flag = cpg.check_call_phone()342 self.assertTrue(flag)343 time.sleep(1)344 flag = cpg.check_call_text(val="153153153153153")345 self.assertTrue(flag)346 # Step:2.点击拨号盘,查看输入框样式347 cpg.click_dial()348 # 2.输入超长数字,收起显示正常349 time.sleep(1)350 # flag = cpg.check_call_phone()351 # self.assertFalse(flag)352 # time.sleep(1)353 flag = cpg.check_call_text(val="153153153153153")354 self.assertTrue(flag)355 @tags('ALL', 'CMCC', 'Call', "ios")356 def test_call_shenlisi_0022(self):357 """检查拨号盘精确搜索功能---内陆本地联系人"""358 # 1.用户已登录和飞信:通话记录列表页面359 # 2.拨号盘输入的内陆号本地已保存360 cpg = CallPage()361 # Step:1.点击“拨号盘”362 cpg.click_dial()363 time.sleep(1)364 # CheckPoint:1.弹出拨号盘界面365 flag = cpg.check_call_phone()366 self.assertTrue(flag)367 # Step:2.输入11位数内陆号368 cpg.dial_number("13800138001")369 # CheckPoint:2.可匹配出符合条件的联系人,匹配的结果高亮370 cpg.page_should_contain_text("给个红包2")371 # ret = cpg.get_call_entry_color_of_element()372 # self.assertEqual(ret, (133, 128, 95, 255))373 # Step:3.点击匹配出的联系人右侧的时间节点374 cpg.click_call_time_search_status()375 time.sleep(1)376 # CheckPoint:3.可进入到该联系人的通话profile377 cpg.page_should_contain_text("分享名片")378 # Step:4.点击拨号按钮379 cpg.click_back()380 cpg.click_call_phone()381 # CheckPoint:4.可弹出拨号方式382 time.sleep(1)383 cpg.page_should_contain_text("飞信电话")384 cpg.page_should_contain_text("语音通话")385 cpg.page_should_contain_text("普通电话")386 @tags('ALL', 'CMCC', 'Call', "ios")387 def test_call_shenlisi_0023(self):388 """检查拨号盘精确搜索功能---内陆陌生联系人"""389 # 1.用户已登录和飞信:通话记录列表页面390 # 2.拨号盘输入的内陆号本地未保存391 # Step:1.点击“拨号盘”392 cpg = CallPage()393 cpg.click_dial()394 time.sleep(1)395 # CheckPoint:1.弹出拨号盘界面396 flag = cpg.check_call_phone()397 self.assertTrue(flag)398 # Step:2.输入11位数内陆号399 cpg.dial_number("15343039999")400 time.sleep(2)401 # CheckPoint:2.通话记录列表弹出“新建联系人”“发送消息”按钮402 cpg.page_should_contain_text("新建联系人")403 cpg.page_should_contain_text("发送消息")404 # Step:3.点击拨号按钮405 cpg.click_call_phone()406 # CheckPoint:3.可弹出拨号方式407 time.sleep(2)408 cpg.page_should_contain_text("飞信电话")409 cpg.page_should_contain_text("语音通话")410 cpg.page_should_contain_text("普通电话")411 @tags('ALL', 'CMCC', 'Call', "ios")412 def test_call_shenlisi_0024(self):413 """检查拨号盘精确搜索功能---香港本地联系人"""414 # 1.用户已登录和飞信:通话记录列表页面415 # 2.拨号盘输入的香港号本地已保存416 cpg = CallPage()417 # Step:1.点击“拨号盘”418 cpg.click_dial()419 time.sleep(1)420 # CheckPoint:1.弹出拨号盘界面421 flag = cpg.check_call_phone()422 self.assertTrue(flag)423 # Step:2.输入8位数香港号424 cpg.dial_number("67656003")425 # CheckPoint:2.可匹配出符合条件的联系人,匹配的结果高亮426 cpg.page_should_contain_text("香港大佬")427 # Step:3.点击匹配出的联系人右侧的时间节点428 cpg.click_call_time_search_status()429 time.sleep(1)430 # CheckPoint:3.可进入到该联系人的通话profile431 cpg.page_should_contain_text("分享名片")432 cpg.click_back()433 @tags('ALL', 'CMCC', 'Call', "ios")434 def test_call_shenlisi_0025(self):435 """检查拨号盘精确搜索功能---香港陌生联系人"""436 # 1.用户已登录和飞信:通话记录列表页面437 # 2.拨号盘输入的香港号本地未保存438 # Step:1.点击“拨号盘”439 cpg = CallPage()440 cpg.click_dial()441 time.sleep(1)442 # CheckPoint:1.弹出拨号盘界面443 flag = cpg.check_call_phone()444 self.assertTrue(flag)445 # Step:2.输入8位数香港号446 cpg.dial_number("23454097")447 time.sleep(2)448 # CheckPoint:2.通话记录列表弹出“新建联系人”“发送消息”按钮449 cpg.page_should_contain_text("新建联系人")450 cpg.page_should_contain_text("发送消息")451 @tags('ALL', 'CMCC', 'Call', "ios")452 def test_call_shenlisi_0026(self):453 """检查从拨号盘进入到陌生人消息会话窗口"""454 # 1.用户已登录和飞信:通话记录列表页面455 # 2.拨号盘已输入陌生联系人A的手机号456 # 3.通话记录列表已弹出“新建联系人”“发送消息”按钮457 cpg = CallPage()458 cpg.click_dial()459 cpg.dial_number("15343038860")460 # Step:1.点击“发送消息”按钮461 cpg.click_send_message()462 chatpage = BaseChatPage()463 flag = chatpage.is_exist_dialog()464 if flag:465 chatpage.click_i_have_read()466 # CheckPoint:1.进入与陌生联系人A的消息回话窗口467 cpg.page_should_contain_text("说点什么...")468 @tags('ALL', 'CMCC', 'Call', "ios")469 def test_call_shenlisi_0027(self):470 """检查从拨号盘新建联系人"""471 # 1.用户已登录和飞信:通话记录列表页面472 # 2.拨号盘已输入陌生联系人A的手机号473 # 3.通话记录列表已弹出“新建联系人”“发送消息”按钮474 cpg = CallPage()475 cpg.click_dial()476 cpg.dial_number("15343038860")477 # Step:1.点击“新建联系人”按钮478 cpg.click_new_contact()479 time.sleep(2)480 cpg.hide_keyboard()481 # CheckPoint:1.跳转到新建联系人界面,电话栏自动填充联系人A的手机号,其它输入框为空482 cpg.page_should_contain_text("输入姓名")483 cpg.page_should_contain_text("15343038860")484 cpg.page_should_contain_text("输入公司")485 cpg.page_should_contain_text("输入职位")486 cpg.page_should_contain_text("输入邮箱")487 @tags('ALL', 'CMCC', 'Call', "ios")488 def test_call_shenlisi_0050(self):489 """检查拨号盘取消拨号方式"""490 # 1.用户已登录和飞信:通话-拨号盘491 # 2.已弹出拨号方式492 cpg = CallPage()493 cpg.click_dial()494 cpg.dial_number("15340038800")495 cpg.click_call_phone()496 time.sleep(1)497 # Step:1.点击“取消”按钮498 cpg.click_back()499 # CheckPoint:1.拨号方式收起,停留在输入号码的拨号盘页500 self.assertTrue(cpg.check_call_phone())501 @tags('ALL', 'CMCC', 'Call', "ios")502 def test_call_shenlisi_0051(self):503 """检查在拨号盘输入异常字符拨号"""504 # 1.用户已登录和飞信:通话-拨号盘505 # 2.在拨号盘已输入*,#、空格等字符506 # 3.无副号507 # Step:1.点击拨号按钮508 cpg = CallPage()509 cpg.click_dial()510 cpg.dial_number("*# ")511 cpg.click_call_phone()512 # CheckPoint:1.提示“输入号码无效,请重新输入”513 flag = cpg.is_toast_exist("输入的号码无效,请重新输入")514 self.assertTrue(flag)515 cpg.click_dial()516 @tags('ALL', 'CMCC', 'Call', "ios")517 def test_call_shenlisi_0064(self):518 """检查拨号盘搜索功能---内陆本地联系人"""519 # 1.用户已登录和飞信:通话记录列表页面520 # 2.拨号盘输入的内陆号本地已保存521 # Step:1.点击“拨号盘”522 cpg = CallPage()523 cpg.click_dial()524 time.sleep(2)525 # CheckPoint:1.弹出拨号盘界面526 flag = cpg.check_call_phone()527 self.assertTrue(flag)528 # Step:2.输入11位数内陆号529 cpg.dial_number("13800138001")530 time.sleep(1)531 # CheckPoint:2.精确匹配出与拨号盘号码一致的手机号联系人532 cpg.page_should_contain_text("给个红包2")533 @tags('ALL', 'CMCC', 'Call', "ios")534 def test_call_shenlisi_0065(self):535 """检查拨号盘搜索功能---内陆陌生联系人"""536 # 1.用户已登录和飞信:通话记录列表页面537 # 2.拨号盘输入的内陆号本地未保存538 # Step:1.点击“拨号盘”539 cpg = CallPage()540 cpg.click_dial()541 time.sleep(1)542 # CheckPoint:1.弹出拨号盘界面543 flag = cpg.check_call_phone()544 self.assertTrue(flag)545 # Step:2.输入11位数内陆号546 cpg.dial_number("15343038867")547 # CheckPoint:2.通话记录列表弹出“新建联系人”“发送消息”按钮548 cpg.page_should_contain_text("新建联系人")549 cpg.page_should_contain_text("发送消息")550 @tags('ALL', 'CMCC', 'Call', "ios")551 def test_call_shenlisi_0066(self):552 """检查拨号盘搜索功能---香港本地联系人"""553 # 1.用户已登录和飞信:通话记录列表页面554 # 2.拨号盘输入的香港号本地已保存555 # Step:1.点击“拨号盘”556 cpg = CallPage()557 cpg.click_dial()558 time.sleep(1)559 # CheckPoint:1.弹出拨号盘界面560 flag = cpg.check_call_phone()561 self.assertTrue(flag)562 # Step:2.输入8位数香港号563 cpg.dial_number("67656003")564 # CheckPoint:2.精确匹配出与拨号盘号码一致的手机号联系人565 cpg.page_should_contain_text("香港大佬")566 cpg.click_back()567 @tags('ALL', 'CMCC', 'Call', "ios")568 def test_call_shenlisi_0067(self):569 """检查拨号盘搜索功能---香港陌生联系人"""570 # 1.用户已登录和飞信:通话记录列表页面571 # 2.拨号盘输入的香港号本地未保存572 # Step:1.点击“拨号盘”573 cpg = CallPage()574 cpg.click_dial()575 time.sleep(1)576 # CheckPoint:1.弹出拨号盘界面577 flag = cpg.check_call_phone()578 self.assertTrue(flag)579 # Step:2.输入8位数香港号580 cpg.dial_number("67656000")581 # CheckPoint:2.通话记录列表弹出“新建联系人”“发送消息”按钮582 cpg.page_should_contain_text("新建联系人")583 cpg.page_should_contain_text("发送消息")584 @tags('ALL', 'CMCC', 'Call', "ios")585 def test_call_shenlisi_0068(self):586 """检查从拨号盘进入到陌生人消息会话窗口"""587 # 1.1.用户已登录和飞信:通话记录列表页面588 # 2.拨号盘已输入陌生联系人A的手机号589 # 3.通话记录列表已弹出“新建联系人”“发送消息”按钮590 cpg = CallPage()591 cpg.click_dial()592 cpg.dial_number("15343038867")593 # Step:1.点击“发送消息”按钮594 cpg.click_send_message()595 chatpage = BaseChatPage()596 if chatpage.is_exist_dialog():597 chatpage.click_i_have_read()598 # CheckPoint:1.进入与陌生联系人A的消息回话窗口599 cpg.page_should_contain_text("说点什么...")600 @tags('ALL', 'CMCC', 'Call', "ios")601 def test_call_shenlisi_0069(self):602 """检查从拨号盘新建联系人"""603 # 1.用户已登录和飞信:通话记录列表页面604 # 2.拨号盘已输入陌生联系人A的手机号605 # 3.通话记录列表已弹出“新建联系人”“发送消息”按钮606 cpg = CallPage()607 cpg.click_dial()608 cpg.dial_number("15343038867")609 # Step:1.点击“新建联系人”按钮610 cpg.click_new_contact()611 time.sleep(2)612 cpg.hide_keyboard()613 # CheckPoint:1.跳转到新建联系人界面,电话栏自动填充联系人A的手机号,其它输入框为空614 cpg.page_should_contain_text("输入姓名")615 cpg.page_should_contain_text("15343038867")616 cpg.page_should_contain_text("输入公司")617 cpg.page_should_contain_text("输入职位")618 cpg.page_should_contain_text("输入邮箱")619 @tags('ALL', 'CMCC', 'Call')620 def test_call_shenlisi_0070(self):621 """检查单聊富媒体面板-音频通话拨打"""622 # 1.登录和飞信:消息tab-单聊会话窗口-富媒体面板623 # 2.已弹出语音通话与视频通话按钮624 cpg = CallPage()625 ContactsPage().click_message_icon()626 Preconditions.enter_single_chat_page("给个红包2")627 BaseChatPage().click_more()628 ChatMorePage().click_voice_and_video_call()629 # Step:1.点击语音通话630 cpg.click_voice_call()631 # CheckPoint:1.直接呼出一对一语音通话632 time.sleep(2)633 cpg.page_should_contain_text("正在呼叫")634 cpg.wait_until(635 timeout=30,636 auto_accept_permission_alert=True,637 condition=lambda d: cpg.is_text_present("说点什么..."))638 # Step:2.点击视频电话639 BaseChatPage().click_more()640 ChatMorePage().click_voice_and_video_call()641 cpg.click_video_call()642 # Step:2.直接呼出一对一视频通话643 time.sleep(2)644 cpg.page_should_contain_text("视频通话呼叫中")645 @tags('ALL', 'CMCC', 'Call', "ios")646 def test_call_shenlisi_0086(self):647 """检查语音通话记录-本地联系人"""648 # 1.A已登录和飞信649 # 2.用户A已成功发起与用户B的语音通话650 # Step:1.用户A查看通话记录651 cpg = CallPage()652 cpg.click_dial()653 time.sleep(1)654 cpg.select_type_start_call(calltype=1, text="13800138001")655 time.sleep(2)656 cpg.hang_up_the_call()657 cpg.wait_for_dial_pad()658 # CheckPoint:1.通话记录展示与用户B的语音通话记录,显示用户B的名称、通话类型【语音通话】、归属地。右侧显示通话时间以及时间节点图标659 cpg.page_should_contain_text("给个红包2")660 cpg.page_should_contain_text("语音通话")661 # cpg.page_should_contain_text("广东深圳")662 # cpg.page_should_contain_text("移动")663 self.assertTrue(cpg.is_exist_call_time())664 # Step:2.点击时间节点665 cpg.click_call_time()666 time.sleep(1)667 # CheckPoint:2.进入到用户B的通话profile668 self.assertTrue(cpg.is_exist_profile_name())669 cpg.click_back()670 @tags('ALL', 'CMCC', 'Call', "ios")671 def test_call_shenlisi_0087(self):672 """检查语音通话记录-企业联系人"""673 # 1.A已登录和飞信674 # 2.用户A已成功发起与用户N的语音通话675 # Step:1.用户A查看通话记录676 cpg = CallPage()677 cpg.click_dial()678 time.sleep(1)679 cpg.select_type_start_call(calltype=1, text="13800137003")680 time.sleep(1)681 cpg.hang_up_the_call()682 cpg.wait_for_dial_pad()683 time.sleep(1)684 if not cpg.is_on_the_call_page():685 cpg.click_call()686 time.sleep(1)687 # CheckPoint:1.通话记录展示与用户B的语音通话记录,显示用户B的名称、通话类型【语音通话】、归属地。右侧显示通话时间以及时间节点图标688 cpg.page_should_contain_text("哈 马上")689 cpg.page_should_contain_text("语音通话")690 self.assertTrue(cpg.is_exist_call_time())691 # Step:2.点击时间节点692 # Step:3.用户N为企业联系人(非本地联系人)693 cpg.click_call_time()694 time.sleep(1)695 # CheckPoint:2.进入到用户N的通话profile696 self.assertTrue(cpg.is_exist_profile_name())697 cpg.click_back()698 @tags('ALL', 'CMCC', 'Call', "ios")699 def test_call_shenlisi_0088(self):700 """检查语音通话记录-陌生联系人"""701 # 1.A已登录和飞信702 # 2.用户A已成功发起与用户B的语音通话703 # Step:1.用户A查看通话记录704 cpg = CallPage()705 cpg.create_call_entry("13537795364")706 # CheckPoint:1.通话记录展示与用户B的语音通话记录,显示用户B的名称、通话类型【语音通话】、归属地。右侧显示通话时间以及时间节点图标707 cpg.page_should_contain_text("13537795364")708 cpg.page_should_contain_text("语音通话")709 # cpg.page_should_contain_text("广东深圳")710 # cpg.page_should_contain_text("移动")711 self.assertTrue(cpg.is_exist_call_time())712 # Step:2.点击时间节点713 cpg.click_call_time()714 time.sleep(1)715 # CheckPoint:2.进入到用户B的通话profile716 self.assertTrue(cpg.is_exist_profile_name())717 cpg.click_back()718 @staticmethod719 def setUp_test_call_shenlisi_0155():720 # 关闭WiFi,打开4G网络721 warnings.simplefilter('ignore', ResourceWarning)722 Preconditions.make_already_in_call()723 CallPage().delete_all_call_entry()724 CallPage().set_network_status(4)725 @tags('ALL', 'CMCC', 'Call')726 def test_call_shenlisi_0155(self):727 """检查语音通话-未订购每月10G用户--4g弹出每月10G免流特权提示窗口"""728 # 1.客户端已登录729 # 2.未订购每月10G用户730 # 3.网络使用4G731 cpg = CallPage()732 # Step:1.发起语音通话733 cpg.select_type_start_call(calltype=1, text="13800138001")734 time.sleep(1)735 # CheckPoint:1.弹出每月10G免流特权提示窗口。736 cpg.page_should_contain_text("每月10G免流特权")737 # Step:2.查看界面738 # CheckPoint:2.加粗文案为:语音通话每分钟消耗约0.3MB流量,订购[每月10G]畅聊语音/视频通话。弹窗底部显示“继续拨打”、“订购免流特权”、“以后不再提示”739 cpg.page_should_contain_text("语音通话每分钟消耗约0.3MB流量,订购[每月10G]畅聊语音/视频通话")740 cpg.page_should_contain_text("继续拨打")741 cpg.page_should_contain_text("订购免流特权")742 cpg.page_should_contain_text("以后不再提示")743 # Step:3.点击“继续拨打”744 cpg.click_text("继续拨打")745 # CheckPoint:3.点击后,直接呼叫746 cpg.page_should_contain_text("正在呼叫")747 # Step:4.再次点击语音通话748 cpg.wait_for_dial_pad()749 cpg.select_type_start_call(calltype=1, text="13800138001")750 # CheckPoint:4.继续弹出提示窗口751 cpg.page_should_contain_text("每月10G免流特权")752 @staticmethod753 def tearDown_test_call_shenlisi_0155():754 # 打开网络755 cpg = CallPage()756 cpg.set_network_status(6)757 preconditions.disconnect_mobile(REQUIRED_MOBILES['IOS-移动'])758 @staticmethod759 def setUp_test_call_shenlisi_0156():760 # 关闭WiFi,打开4G网络761 warnings.simplefilter('ignore', ResourceWarning)762 Preconditions.make_already_in_call()763 CallPage().delete_all_call_entry()764 CallPage().set_network_status(4)765 @tags('ALL', 'CMCC', 'Call')766 def test_call_shenlisi_0156(self):767 """检查4g免流特权提示权订购免流特权提示窗口订购免流界面跳转---语音通话"""768 # 1.客户端已登录769 # 2.已弹出4g弹出每月10G免流特权提示窗口770 cpg = CallPage()771 cpg.select_type_start_call(calltype=1, text="13800138001")772 # 1.点击订购免流特权773 cpg.click_text("订购免流特权")774 # 1.跳转到【和飞信送你每月10G流量】H5页面775 cpg.wait_until(timeout=30, auto_accept_permission_alert=True,776 condition=lambda d: cpg.is_text_present("和飞信送你每月10G流量"))777 cpg.page_should_contain_text("和飞信送你每月10G流量")778 # 2.点击返回按钮779 cpg.click_back()780 # 2.点击返回按钮,返回上一级781 cpg.page_should_contain_text("每月10G免流特权")782 @staticmethod783 def tearDown_test_call_shenlisi_0156():784 # 打开网络785 cpg = CallPage()786 cpg.set_network_status(6)787 preconditions.disconnect_mobile(REQUIRED_MOBILES['IOS-移动'])788 @staticmethod789 def setUp_test_call_shenlisi_0158():790 # 确保打开WiFi网络791 Preconditions.make_already_in_call()792 # CalllogBannerPage().skip_multiparty_call()793 # CallPage().delete_all_call_entry()794 # CallPage().set_network_status(6)795 @tags('ALL', 'CMCC', 'Call', "ios")796 def test_call_shenlisi_0158(self):797 """检查语音呼叫-未订购每月10G用户--用户在WiFi环境下不提示此类弹窗"""798 # 1.客户端已登录799 # 2.未订购每月10G用户800 # 3.网络使用WIFI801 # 1.发起语音通话802 cpg = CallPage()803 cpg.click_dial()804 cpg.dial_number("13800138001")805 cpg.click_call_phone()806 time.sleep(2)807 CallTypeSelectPage().click_call_by_voice()808 time.sleep(2)809 # 1.直接发起语音通话,没有弹窗810 cpg.page_should_not_contain_text("每月10G免流特权")811 time.sleep(1)812 cpg.wait_for_dial_pad()813 cpg.click_dial()814 @tags('ALL', 'CMCC', 'Call', "ios")815 def test_call_shenlisi_0213(self):816 """检查视频通话记录——本地联系人"""817 # 1.A已登录和飞信818 # 2.用户A已成功发起与用户B的视频通话819 cpg = CallPage()820 cpg.click_multi_party_video()821 time.sleep(1)822 CalllogBannerPage().input_telephone("13800138001")823 time.sleep(1)824 cpg.click_text("给个红包2")825 time.sleep(1)826 cpg.click_text("呼叫")827 time.sleep(1)828 # Step:1.用户A查看通话记录829 cpg.wait_for_page_load()830 # CheckPoint:1.通话记录展示与用户B的视频通话记录,显示用户B的名称、通话类型【视频通话】、手机号/归属地831 cpg.page_should_contain_text("给个红包2")832 cpg.page_should_contain_text("视频通话")833 @tags('ALL', 'CMCC', 'Call')834 def test_call_shenlisi_0215(self):835 """检查视频通话记录-陌生联系人"""836 # 1.A已登录和飞信837 # 2.用户A已成功发起与用户B的视频通话838 cpg = CallPage()839 cpg.click_multi_party_video()840 CalllogBannerPage().input_telephone("13537795364")841 cpg.swipe_by_percent_on_screen(50, 40, 50, 10)842 # cpg.hide_keyboard()843 time.sleep(2)844 cpg.click_text("未知号码")845 time.sleep(1)846 cpg.click_text("呼叫")847 time.sleep(1)848 # Step:1.用户A查看通话记录849 cpg.wait_for_page_load()850 # CheckPoint:1.通话记录展示与用户B的视频通话记录,显示用户B的名称、通话类型【视频通话】、手机号/归属地851 cpg.page_should_contain_text("13537795364")852 cpg.page_should_contain_text("视频通话")853 cpg.page_should_contain_text("广东深圳")854 # cpg.page_should_contain_text("移动")855 # self.assertTrue(cpg.is_exist_call_time())856 @tags('ALL', 'CMCC', 'Call', "ios")857 def test_call_shenlisi_0218(self):858 """检查呼叫本地联系人,呼叫界面展示名称+手机号"""859 # 1.已登录和飞信860 # 2.用户M为本地联系人861 # 3.已开启麦克风,相机权限862 cpg = CallPage()863 cpg.click_dial()864 cpg.dial_number("13800138001")865 cpg.click_call_time_search_status()866 time.sleep(1)867 # Step:1.视频呼叫M,进入到呼叫界面868 CallContactDetailPage().click_video_call()869 time.sleep(1)870 # CheckPoint:1.头像下展示用户M的名称+手机号871 cpg.page_should_contain_text("13800138001")872 cpg.page_should_contain_text("给个红包2")873 CallContactDetailPage().wait_for_star()874 @tags('ALL', 'CMCC', 'Call')875 def test_call_shenlisi_0219(self):876 """检查呼叫陌生联系人,呼叫界面展示手机号+归属地"""877 # 1.已登录和飞信878 # 2.用户M为陌生联系人可获取到归属地879 # 3.用户N为陌生联系人无法获取归属地(香港号,198开头11位手机号)880 # 3.已开启麦克风,相机权限881 cpg = CallPage()882 cpg.create_call_entry("15343038867")883 cpg.click_dial()884 cpg.click_call_time_search_status()885 time.sleep(1)886 # Step:1.视频呼叫M,进入到呼叫界面887 CallContactDetailPage().click_video_call()888 time.sleep(1)889 # CheckPoint:1.头像下展示用户M的手机号+归属地890 cpg.page_should_contain_text("15343038867")891 cpg.page_should_contain_text("湖南-株洲")892 CallContactDetailPage().wait_for_star()893 cpg.click_back()894 # Step:2.视频呼叫N,进入到呼叫界面895 cpg = CallPage()896 cpg.create_call_entry("19823452586")897 cpg.click_dial()898 cpg.click_call_time_search_status()899 time.sleep(1)900 # Step:2.视频呼叫N,进入到呼叫界面901 CallContactDetailPage().click_video_call()902 time.sleep(1)903 # CheckPoint:2.头像下展示用户M的手机号+未知归属地904 cpg.page_should_contain_text("19823452586")905 cpg.page_should_contain_text("未知归属地")906 CallContactDetailPage().wait_for_star()907 @staticmethod908 def setUp_test_call_shenlisi_0234():909 # 确保打开WiFi网络910 Preconditions.make_already_in_call()911 # CalllogBannerPage().skip_multiparty_call()912 # CallPage().delete_all_call_entry()913 # CallPage().set_network_status(6)914 @tags('ALL', 'CMCC', 'Call', "ios")915 def test_call_shenlisi_0234(self):916 """检查视频呼叫-未订购每月10G用户--用户在WiFi环境下不提示此类弹窗"""917 # 1.客户端已登录918 # 2.未订购每月10G用户919 # 3.网络使用WIFI920 # 1.发起视频通话921 cpg = CallPage()922 cpg.click_dial()923 cpg.dial_number("13800138001")924 cpg.click_call_time_search_status()925 CallContactDetailPage().click_video_call()926 time.sleep(2)927 # 1.直接发起语音通话,没有弹窗928 cpg.page_should_not_contain_text("每月10G免流特权")929 time.sleep(1)930 CallContactDetailPage().wait_for_star()931 cpg.click_back()932 @tags('ALL', 'CMCC', 'Call')933 def test_call_shenlisi_0314(self):934 """检查通话界面发起多方视频"""935 # 1.客户端已登陆在:通话界面936 # 2.网络正常937 # 3.成员手机号有效938 # Step:1.点击【多方视频】按钮939 cpg = CallPage()940 cmvp = MultiPartyVideoPage()941 cpg.click_multi_party_video()942 time.sleep(2)943 # CheckPoint:1.跳转至发起视频-选择成员界面944 cpg.page_should_contain_text("选择团队联系人")945 # Step:2.选择成员946 # 选择本地一个,号码搜索一个947 cmvp.click_contact_item(index=2)948 time.sleep(1)949 cmvp.input_contact_search("13537795364")950 cpg.click_text("未知号码")951 # CheckPoint:2.被选的成员接显示在已选成员列表952 self.assertTrue(cmvp.is_exist_contact_selection())953 # Step:3.点击【呼叫】按钮954 cmvp.click_tv_sure()955 time.sleep(1)956 # CheckPoint:3.转入多方视频拨通界面957 cpg.page_should_contain_text("关闭摄像头")958 @tags('ALL', 'CMCC', 'Call')959 def test_call_shenlisi_0324(self):960 """在通话界面邀请无效手机号发起多方视频"""961 # 1.客户端已登陆在:通话界面962 # 2.网络正常963 # 3.邀请无效手机号进入到多方视频通话964 cpg = CallPage()965 cmvp = MultiPartyVideoPage()966 # Step:1.【多方视频】按钮967 cpg.click_multi_party_video()968 time.sleep(2)969 # CheckPoint:1.跳转至发起视频-选择成员界面970 cpg.page_should_contain_text("选择团队联系人")971 # Step:2.输入任意非手机号数字972 cmvp.input_contact_search("13800138005991")973 time.sleep(2)974 # CheckPoint:2.联系人选择器无法识别出无效手机号975 cpg.page_should_not_contain_text("本地联系人")976 cpg.page_should_not_contain_text("网络搜索")977 cpg.click_back()978 @tags('ALL', 'CMCC', 'Call')979 def test_call_shenlisi_0326(self):980 """检查无副号时通话记录列表页面"""981 # 1.用户已登录和飞信通话记录列表页面982 # 2.无副号983 cpg = CallPage()984 time.sleep(1)985 # Step:1,查看界面986 # CheckPoint:1.左上角显示“通话”,右边显示“视频”按钮,中间显示通话记录,右下方显示“多方电话”悬浮987 self.assertTrue(cpg.check_call_display())988 self.assertTrue(cpg.check_multiparty_video())989 self.assertTrue(cpg.check_feixin_call())990 # Step:2.点击拨号盘991 cpg.click_dial()992 # CheckPoint:2.弹出拨号盘,顶部栏被遮挡993 self.assertFalse(cpg.check_call_display())994 self.assertFalse(cpg.check_multiparty_video())995 cpg.click_dial()996 @tags('ALL', 'CMCC', 'Call')997 def test_call_shenlisi_0328(self):998 """检查通通话列表为空"""999 # 1.用户已登录和飞信通话记录列表页面1000 # 2.通讯录为空1001 cpg = CallPage()1002 time.sleep(1)1003 # Step:1,查看界面1004 # CheckPoint:1.界面logo提示“给你的好友打个电话吧”1005 # self.assertTrue(cpg.check_call_image())1006 cpg.page_should_contain_text("高清通话,高效沟通")1007 @tags('ALL', 'CMCC', 'Call')1008 def test_call_shenlisi_0333(self):1009 """检查清零未接通话数"""1010 # 1.用户已登录和飞信消息tab1011 # 2.通话tab右上角显示未读消息气泡1012 # Step:1.点击通话tab1013 cpg = CallPage()1014 cpg.click_call()1015 # CheckPoint:1.通话未接数清零,图标变为拨号盘按钮1016 # 清空通话记录1017 cpg.delete_all_call_entry()1018 cpg.page_should_contain_text("高清通话,高效沟通")1019 @tags('ALL', 'CMCC', 'Call')1020 def test_call_shenlisi_0347(self):1021 """检查本地联系人通话profile左上角显示名称"""1022 # 1.已登录和飞信:通话tab1023 # 2.已存在与本地联系人的通话记录M1024 # Step:1.点击记录M的时间节点1025 cpg = CallPage()1026 cpg.create_call_entry("13800138001")1027 cpg.click_dial()1028 cpg.click_call_time_search_status()1029 # CheckPoint:1.进入到M的通话profile界面1030 time.sleep(2)1031 cpg.page_should_contain_text("分享名片")1032 # Step:2.查看左上角的名称1033 ret = cpg.get_profile_name()1034 # CheckPoint:2.左上角<按钮。以及M名称1035 self.assertEqual(ret, "给个红包2")1036 # Step:3.点击<按钮>1037 cpg.click_back()1038 cpg.click_dial()1039 time.sleep(2)1040 # CheckPoint:3.返回到上一个界面1041 self.assertTrue(cpg.is_on_the_call_page())1042 @tags('ALL', 'CMCC', 'Call')1043 def test_call_shenlisi_0348(self):1044 """检查陌生联系人通话profile左上角显示手机号"""1045 # 1.已登录和飞信:通话tab1046 # 2.已存在与陌生联系人的通话记录M1047 # Step:1.点击记录M的时间节点1048 cpg = CallPage()1049 cpg.create_call_entry("19912345678")1050 cpg.click_dial()1051 cpg.click_call_time_search_status()1052 # CheckPoint:1.进入到M的通话profile界面1053 time.sleep(2)1054 self.assertTrue(cpg.is_exist_profile_name())1055 # Step:2.查看左上角的名称1056 ret = cpg.get_profile_name()1057 # CheckPoint:2.左上角<按钮。以及N的手机号1058 self.assertEqual(ret, "19912345678")1059 # Step:3.点击<按钮>1060 cpg.click_back()1061 cpg.click_dial()1062 time.sleep(2)1063 # CheckPoint:3.返回到上一个界面1064 self.assertTrue(cpg.is_on_the_call_page())1065 @tags('ALL', 'CMCC', 'Call')1066 def test_call_shenlisi_0353_001(self):1067 """检查通话profile界面可进入到消息会话窗口--本地联系人"""1068 # 1.已登录和飞信:通话tab1069 # 2.已进入到联系人通话profile1070 # 本地联系人1071 cpg = CallPage()1072 cpg.create_call_entry("13800138001")1073 cpg.click_dial()1074 cpg.click_call_time_search_status()1075 time.sleep(2)1076 cpg.page_should_contain_text("分享名片")1077 # Step:1.点击消息按钮1078 CallContactDetailPage().click_normal_message()1079 # CheckPoint:1.进入到与该联系人的消息会话框。本地联系人左上角显示名称。陌生联系人,左上角显示手机号1080 chatpage = BaseChatPage()1081 flag = chatpage.is_exist_dialog()1082 if flag:1083 chatpage.click_i_have_read()1084 cpg.page_should_contain_text("说点什么...")1085 cpg.page_should_contain_text("给个红包2")1086 @tags('ALL', 'CMCC', 'Call')1087 def test_call_shenlisi_0353_002(self):1088 """检查通话profile界面可进入到消息会话窗口--陌生联系人"""1089 # 陌生联系人1090 cpg = CallPage()1091 cpg.create_call_entry("19912345678")1092 cpg.click_dial()1093 cpg.click_call_time_search_status()1094 time.sleep(2)1095 self.assertTrue(cpg.is_exist_profile_name())1096 # Step:1.点击消息按钮1097 CallContactDetailPage().click_normal_message()1098 # CheckPoint:1.进入到与该联系人的消息会话框。本地联系人左上角显示名称。陌生联系人,左上角显示手机号1099 chatpage = BaseChatPage()1100 flag = chatpage.is_exist_dialog()1101 if flag:1102 chatpage.click_i_have_read()1103 cpg.page_should_contain_text("说点什么...")1104 cpg.page_should_contain_text("19912345678")1105 @tags('ALL', 'CMCC', 'Call')1106 def test_call_shenlisi_0355(self):1107 """检查通话profile界面发起语音通话"""1108 # 1.已登录和飞信:通话tab1109 # 2.已进入到联系人通话profile1110 # 3.有效手机号1111 # Step:1.点击语音通话按钮1112 cpg = CallPage()1113 cpg.create_call_entry("13800138001")1114 cpg.click_dial()1115 cpg.click_call_time_search_status()1116 time.sleep(2)1117 self.assertTrue(cpg.is_exist_profile_name())1118 CallContactDetailPage().click_voice_call()1119 cpg.page_should_contain_text("正在呼叫")1120 # CheckPoint:1.发起1v1语音呼叫1121 CallContactDetailPage().wait_for_star()1122 @tags('ALL', 'CMCC', 'Call')1123 def test_call_shenlisi_0356(self):1124 """检查通话profile界面发起视频通话"""1125 # 1.已登录和飞信:通话tab1126 # 2.已进入到联系人通话profile1127 # 3.有效手机号1128 # Step:1.点击视频通话1129 cpg = CallPage()1130 cpg.create_call_entry("13800138001")1131 cpg.click_dial()1132 cpg.click_call_time_search_status()1133 time.sleep(2)1134 CallContactDetailPage().click_video_call()1135 cpg.page_should_contain_text("网络视频通话呼叫中")1136 # CheckPoint:1.发起1v1视频呼叫1137 CallContactDetailPage().wait_for_star()1138 @tags('ALL', 'CMCC', 'Call')1139 def test_call_shenlisi_0358(self):1140 """检查本地联系人通话profile"""1141 # 1.已登录和飞信-通话记录列表1142 # 2.已进入到本地联系人A的通话profile1143 # 3.用户A为RCS用户并保存至本地1144 # 4.当前登录账号无副号1145 # Step:1.查看界面1146 cpg = CallPage()1147 cpg.create_call_entry("13800138001")1148 cpg.click_dial()1149 cpg.click_call_time_search_status()1150 time.sleep(2)1151 # CheckPoint:1.进功能有:星标、编辑、分享名片。消息、电话、语音通话、视频通话、和飞信电话高亮。页面显示:在和飞信电话按钮下显示公司、职位、邮箱(公司、职位、邮箱有则显示),通话记录。底部显示【分享名片】,点击调起联系人选择器1152 self.assertTrue(CallContactDetailPage().is_exist_star())1153 cpg.page_should_contain_text("编辑")1154 cpg.page_should_contain_text("分享名片")1155 cpg.page_should_contain_text("消息")1156 cpg.page_should_contain_text("电话")1157 cpg.page_should_contain_text("语音通话")1158 cpg.page_should_contain_text("视频通話")1159 cpg.page_should_contain_text("飞信电话")1160 cpg.page_should_contain_text("拨出电话")1161 CallContactDetailPage().click_share_card()1162 time.sleep(2)1163 cpg.page_should_contain_text("选择联系人")1164 @tags('ALL', 'CMCC', 'Call')1165 def test_call_shenlisi_0360(self):1166 """检查陌生人通话profile"""1167 # 1.已登录和飞信-通话记录列表1168 # 2.已进入到陌生联系人B的通话profile1169 # 3.用户B为RCS用户并为陌生人1170 # 4.当前登录账号无副号1171 # Step:1.查看界面1172 cpg = CallPage()1173 cpg.create_call_entry("13537795364")1174 cpg.click_dial()1175 cpg.click_call_time_search_status()1176 time.sleep(2)1177 # CheckPoint:1.功能有:保存到通讯录。消息、电话、语音通话、视频通话、和飞信电话高亮。页面显示:在和飞信电话按钮下显示通话记录。底部显示【保存到通讯录】,点击进入到编辑页面1178 time.sleep(2)1179 cpg.page_should_contain_text("保存到通讯录")1180 cpg.page_should_contain_text("消息")1181 cpg.page_should_contain_text("电话")1182 cpg.page_should_contain_text("语音通话")1183 cpg.page_should_contain_text("视频通話")1184 cpg.page_should_contain_text("飞信电话")1185 cpg.page_should_contain_text("拨出电话")1186 CallContactDetailPage().click_save_contacts()1187 @tags('ALL', 'CMCC', 'Call')1188 def test_call_shenlisi_0363(self):1189 """检查非RCS通话profile--陌生联系人"""1190 # 1.已登录和飞信-通话记录列表1191 # 2.已进入到本地联系人C的通话profile1192 # 3.用户C为非RCS用户并为陌生人1193 # 4.当前登录账号无副号1194 # Step:1.查看界面1195 cpg = CallPage()1196 cpg.create_call_entry("15343038890")1197 cpg.click_dial()1198 cpg.click_call_time_search_status()1199 # CheckPoint:1.功能有:保存到通讯录、邀请使用。消息、电话、语音通话、视频通话、和飞信电话高亮。页面显示:在和飞信电话按钮下显示通话记录。底部显示【保存到通讯录】,点击进入到编辑页面。【邀请使用】,点击调起系统短信1200 time.sleep(2)1201 cpg.page_should_contain_text("保存到通讯录")1202 cpg.page_should_contain_text("邀请使用")1203 cpg.page_should_contain_text("消息")1204 cpg.page_should_contain_text("电话")1205 cpg.page_should_contain_text("语音通话")1206 cpg.page_should_contain_text("视频通話")1207 cpg.page_should_contain_text("飞信电话")1208 cpg.page_should_contain_text("拨出电话")1209 ContactDetailsPage().click_invitation_use()1210 time.sleep(1)1211 cpg.page_should_contain_text("新信息")1212 cpg.page_should_contain_text("收件人:")1213 @tags('ALL', 'CMCC', 'Call')1214 def test_call_shenlisi_0381(self):1215 """检查单聊富媒体面板-音频通话包含语音通话年华、视频"""1216 # 1.登录和飞信:消息tab-单聊会话窗口-富媒体面板1217 # Step: 1.1.点击音频电话按钮1218 cpg = CallPage()1219 ContactsPage().click_message_icon()1220 Preconditions.enter_single_chat_page("给个红包2")1221 BaseChatPage().click_more()1222 ChatMorePage().click_voice_and_video_call()1223 time.sleep(1)1224 # CheckPoint: 1.展开的富媒体消息体选择面板收起后Android:中间弹出”语音通话、视频通话“两个按钮1225 cpg.page_should_contain_text("语音通话")1226 cpg.page_should_contain_text("视频通话")1227 cpg.page_should_contain_text("取消")1228 @tags('ALL', 'CMCC', 'Call')1229 def test_call_shenlisi_0395(self):1230 """检查群聊聊富媒体面板-多方电话入口拨打"""1231 # 1.登录和飞信:消息tab-群聊会话窗口-富媒体面板1232 # 2.已弹出系统选择弹窗多方电话和多方视频1233 ContactsPage().click_message_icon()1234 Preconditions.get_into_group_chat_page("群聊1")1235 # Step:1.点击多方电话1236 gpg = GroupListPage()1237 gpg.click_mult_call_icon()1238 CallPage().click_feixin_call_free()1239 # CheckPoint:1.调起联系人选择器1240 time.sleep(1)1241 gpg.page_should_contain_text("搜索群成员")1242 CallPage().click_back()1243 # Step:2.点击多方视频1244 gpg = GroupListPage()1245 gpg.click_mult_call_icon()1246 CallPage().click_mutil_video_call()1247 # CheckPoint:2.调起联系人选择器1248 time.sleep(1)...

Full Screen

Full Screen

contactPage.py

Source:contactPage.py Github

copy

Full Screen

...147 @tags('All','CMCC')148 def test_contacts_0001(self):149 """验证通讯录页面元素"""150 contacts = ContactsPage()151 contacts.page_should_contain_text('通讯录')152 # contacts.page_should_contain_element('+')153 contacts.page_should_contain_text('搜索')154 if contacts.is_text_present('备份你的手机通讯录,联系人数据不丢失'):155 contacts.page_should_contain_text('备份你的手机通讯录,联系人数据不丢失')156 time.sleep(2)157 contacts.page_should_contain_text('群聊')158 contacts.page_should_contain_text('标签分组')159 contacts.page_should_contain_text('公众号')160 contacts.page_should_contain_text('和通讯录')161 @staticmethod162 def setUp_test_contacts_0002():163 Preconditions.connect_mobile('Android-移动')164 current_mobile().hide_keyboard_if_display()165 Preconditions.reset_and_relaunch_app()166 Preconditions.make_already_in_one_key_login_page()167 Preconditions.login_by_one_key_login()168 MessagePage().wait_for_page_load()169 @tags('All', 'CMCC')170 def test_contacts_0002(self):171 """访问本地通讯录权限框,点击确定"""172 MessagePage().click_contacts()173 ContactsPage().click_always_allowed()174 time.sleep(2)175 @staticmethod176 def setUp_test_contacts_0003():177 Preconditions.connect_mobile('Android-移动')178 current_mobile().hide_keyboard_if_display()179 Preconditions.reset_and_relaunch_app()180 Preconditions.make_already_in_one_key_login_page()181 Preconditions.login_by_one_key_login()182 MessagePage().wait_for_page_load()183 @tags('All', 'CMCC')184 def test_contacts_0003(self):185 """允许访问本地通讯录"""186 MessagePage().click_contacts()187 contact=ContactsPage()188 contact.click_forbidden()189 time.sleep(1)190 @staticmethod191 def setUp_test_contacts_0015():192 Preconditions.connect_mobile('Android-移动')193 current_mobile().hide_keyboard_if_display()194 Preconditions.make_already_in_message_page()195 time.sleep(1)196 MessagePage().click_contacts()197 time.sleep(2)198 if ContactsPage().is_text_present('需要使用通讯录权限'):199 ContactsPage().click_always_allowed()200 # 创建联系人 测试1201 ContactsPage().click_add()202 creat_contact = CreateContactPage()203 creat_contact.click_input_name()204 creat_contact.input_name('测试1')205 creat_contact.click_input_number()206 creat_contact.input_number('17324448506')207 creat_contact.save_contact()208 time.sleep(2)209 # 创建联系人2210 ContactDetailsPage().click_back_icon()211 ContactsPage().click_add()212 creat_contact.click_input_name()213 creat_contact.input_name('测试2')214 creat_contact.click_input_number()215 creat_contact.input_number('15570670329')216 creat_contact.save_contact()217 time.sleep(2)218 ContactDetailsPage().click_back_icon()219 #创建联系人测试3220 ContactsPage().click_add()221 creat_contact.click_input_name()222 creat_contact.input_name('测试3')223 creat_contact.click_input_number()224 creat_contact.input_number('12554555554')225 creat_contact.save_contact()226 time.sleep(2)227 ContactDetailsPage().click_back_icon()228 #创建联系人测试4229 ContactsPage().click_add()230 creat_contact.click_input_name()231 creat_contact.input_name('测试4')232 creat_contact.click_input_number()233 creat_contact.input_number('12345678912')234 creat_contact.save_contact()235 time.sleep(2)236 ContactDetailsPage().click_back_icon()237 @tags('All', 'CMCC')238 def test_contacts_0015(self):239 """已保存到本地的RCS用户的profile页"""240 ContactsPage().click_search_box()241 # 搜索联系人:测试1242 ContactListSearchPage().input_search_keyword('测试1')243 ContactListSearchPage().click_contact('测试1')244 time.sleep(3)245 # 进入个人详情页246 # 页面包含的元素247 detailpage = ContactDetailsPage()248 detailpage.page_should_contain_text('测试1')249 detailpage.page_should_contain_text('173 2444 8506')250 detailpage.page_should_contain_text('C')251 if detailpage.is_text_present("公司"):252 detailpage.page_should_contain_text('公司')253 if detailpage.is_text_present("职位"):254 detailpage.page_should_contain_text('职位')255 if detailpage.is_text_present("邮箱"):256 detailpage.page_should_contain_text('邮箱')257 detailpage.page_should_contain_text('消息')258 detailpage.page_should_contain_text('电话')259 detailpage.page_should_contain_text('语音通话')260 detailpage.page_should_contain_text('视频通话')261 detailpage.page_should_contain_text('和飞信电话')262 detailpage.page_should_contain_text('分享名片')263 # 点击头像查看大图264 detailpage.click_avatar()265 time.sleep(2)266 detailpage.click_big_avatar()267 # 消息按钮可点击268 detailpage.click_message_icon() # 进入消息页面269 time.sleep(2)270 if ChatWindowPage().is_text_present("用户须知"):271 # 如果存在用户须知,就点击已阅读,然后点击返回.如果不存在,就直接点击返回272 ChatWindowPage().click_already_read()273 ChatWindowPage().click_sure_icon()274 ChatWindowPage().click_back()275 else:276 ChatWindowPage().click_back()277 # 点击电话/点击语音通话/点击视频通话先不做278 # 分享名片按钮可点击279 detailpage.click_share_business_card()280 SelectContactsPage().select_local_contacts()281 SelectContactsPage().input_search_keyword('测试2')282 SelectContactsPage().click_cantact_avatar()283 SelectContactsPage().click_share_card()284 #返回消息页面285 detailpage.click_back_icon()286 ContactListSearchPage().click_back()287 ContactsPage().click_message_icon()288 @staticmethod289 def setUp_test_contacts_0016():290 Preconditions.connect_mobile('Android-移动')291 current_mobile().hide_keyboard_if_display()292 Preconditions.make_already_in_message_page()293 MessagePage().click_contacts()294 if ContactsPage().is_text_present('需要使用通讯录权限'):295 ContactsPage().click_always_allowed()296 @tags('All', 'CMCC')297 def test_contacts_0016(self):298 """已保存到本地的非RCS用户的profile页"""299 ContactsPage().click_search_box()300 #搜索联系人:测试2301 ContactListSearchPage().input_search_keyword('测试2')302 ContactListSearchPage().click_contact('测试2')303 time.sleep(2)304 #进入个人详情页305 #页面包含的元素306 detailpage=ContactDetailsPage()307 detailpage.page_should_contain_text('测试2')308 detailpage.page_should_contain_text('155 7067 0329')309 detailpage.page_should_contain_text('C')310 if detailpage.is_text_present("公司"):311 detailpage.page_should_contain_text('公司')312 if detailpage.is_text_present("职位"):313 detailpage.page_should_contain_text('职位')314 if detailpage.is_text_present("邮箱"):315 detailpage.page_should_contain_text('邮箱')316 detailpage.page_should_contain_text('消息')317 detailpage.page_should_contain_text('电话')318 detailpage.page_should_contain_text('语音通话')319 detailpage.page_should_contain_text('视频通话')320 detailpage.page_should_contain_text('和飞信电话')321 detailpage.page_should_contain_text('分享名片')322 detailpage.page_should_contain_text('邀请使用')323 time.sleep(2)324 #点击头像可查看大图325 detailpage.click_avatar()326 time.sleep(2)327 detailpage.click_big_avatar()328 #消息按钮可点击329 detailpage.click_message_icon() #进入消息页面330 time.sleep(2)331 if ChatWindowPage().is_text_present("用户须知"):332 #如果存在用户须知,就点击已阅读,然后点击返回.如果不存在,就直接点击返回333 ChatWindowPage().click_already_read()334 ChatWindowPage().click_sure_icon()335 ChatWindowPage().click_back()336 else:337 ChatWindowPage().click_back()338 #点击电话/点击语音通话/点击视频通话先不做339 #点击分享名片340 detailpage.click_share_business_card()341 SelectContactsPage().select_local_contacts()342 SelectContactsPage().input_search_keyword('测试1')343 SelectContactsPage().click_cantact_avatar()344 SelectContactsPage().click_share_card()345 #邀请使用按钮可点击 暂时未做346 #返回消息页面347 detailpage.click_back_icon()348 ContactListSearchPage().click_back()349 ContactsPage().click_message_icon()350 @staticmethod351 def setUp_test_contacts_0017():352 Preconditions.connect_mobile('Android-移动')353 current_mobile().hide_keyboard_if_display()354 Preconditions.make_already_in_message_page()355 MessagePage().click_contacts()356 if ContactsPage().is_text_present('需要使用通讯录权限'):357 ContactsPage().click_always_allowed()358 time.sleep(2)359 # 创建联系人本机360 ContactsPage().click_add()361 creat_contact2=CreateContactPage()362 creat_contact2.click_input_name()363 creat_contact2.input_name('本机')364 creat_contact2.click_input_number()365 phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)366 creat_contact2.input_number(phone_number[0])367 creat_contact2.save_contact()368 time.sleep(2)369 ContactDetailsPage().click_back_icon()370 @tags('All', 'CMCC')371 def test_contacts_0017(self):372 """已保存到本地的本机用户的profile页"""373 ContactsPage().click_search_box()374 # 搜索联系人:本机375 ContactListSearchPage().input_search_keyword('本机')376 ContactListSearchPage().click_contact('本机')377 time.sleep(2)378 # 进入个人详情页379 #判断页面包含的元素380 detailpage = ContactDetailsPage()381 detailpage.page_should_contain_text('本机')382 phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)383 detailpage.page_should_contain_text('198 4947 6421')384 detailpage.page_should_contain_text('B')385 if detailpage.is_text_present("公司"):386 detailpage.page_should_contain_text('公司')387 if detailpage.is_text_present("职位"):388 detailpage.page_should_contain_text('职位')389 if detailpage.is_text_present("邮箱"):390 detailpage.page_should_contain_text('邮箱')391 detailpage.page_should_contain_text('消息')392 detailpage.page_should_contain_text('电话')393 detailpage.page_should_contain_text('语音通话')394 detailpage.page_should_contain_text('视频通话')395 detailpage.page_should_contain_text('和飞信电话')396 detailpage.page_should_contain_text('分享名片')397 #点击分享名片进入选择联系人页面,可以成功的分享给人/群398 detailpage.click_share_business_card()399 SelectContactsPage().select_local_contacts()400 SelectContactsPage().input_search_keyword('测试1')401 SelectContactsPage().click_cantact_avatar()402 SelectContactsPage().click_share_card()403 #消息、电话、语音视频、视频电话、副号拨打、和飞信电话置灰,不可点击404 time.sleep(2)405 detailpage.message_btn_is_clickable()406 detailpage.call_btn_is_clickable()407 detailpage.voice_btn_is_clickable()408 detailpage.video_call_btn_is_clickable()409 detailpage.hefeixin_call_btn_is_clickable()410 time.sleep(2)411 #返回消息页面412 detailpage.click_back_icon()413 ContactListSearchPage().click_back()414 ContactsPage().click_message_icon()415 @staticmethod416 def setUp_test_contacts_0036():417 Preconditions.connect_mobile('Android-移动')418 current_mobile().hide_keyboard_if_display()419 Preconditions.make_already_in_message_page()420 MessagePage().click_contacts()421 @tags('All', 'CMCC')422 def test_contacts_0036(self):423 """用户未加入任何企业"""424 contact=ContactsPage()425 contact.click_and_address()426 time.sleep(3)427 HeContactsPage().page_should_contain_text('未加入企业')428 #返回消息页面429 HeContactsPage().click_back_icon()430 ContactsPage().click_message_icon()431 @staticmethod432 def setUp_test_contacts_0195():433 #进入通讯录页面434 Preconditions.connect_mobile('Android-移动')435 current_mobile().hide_keyboard_if_display()436 Preconditions.make_already_in_message_page()437 MessagePage().click_contacts()438 if ContactsPage().is_text_present('需要使用通讯录权限'):439 ContactsPage().click_always_allowed()440 ContactsPage().click_search_box()441 ContactListSearchPage().input_search_keyword('测试1')442 ContactListSearchPage().click_contact('测试1')443 time.sleep(2)444 @tags('All', 'CMCC')445 def test_contacts_0195(self):446 """分享名片,搜索选择一个群分享名片,弹框确认是否分享"""447 ContactListSearchPage().click_share_card()448 SelectContactsPage().click_select_one_group()449 #搜索框文本显示'搜索群组'450 SelectOneGroupPage().is_text_present('搜索群组')451 #不存在搜索结果时,显示"无搜索结果452 SelectOneGroupPage().click_search_group()453 SelectOneGroupPage().input_search_keyword('红包')454 SelectOneGroupPage().page_should_contain_text('无搜索结果')455 #存在搜索结果时,搜索结果包含关键字456 time.sleep(2)457 SelectOneGroupPage().click_back_icon()458 SelectOneGroupPage().click_search_group()459 SelectOneGroupPage().input_search_keyword('测试群1')460 SelectOneGroupPage().is_group_in_list('测试群1')461 SelectOneGroupPage().select_one_group_by_name('测试群1')462 SelectOneGroupPage().click_share_business_card()463 #返回消息页面464 ContactDetailsPage().click_back_icon()465 ContactListSearchPage().click_back()466 ContactsPage().click_message_icon()467 @staticmethod468 def setUp_test_contacts_0196():469 Preconditions.connect_mobile('Android-移动')470 current_mobile().hide_keyboard_if_display()471 Preconditions.make_already_in_message_page()472 MessagePage().click_contacts()473 if ContactsPage().is_text_present('需要使用通讯录权限'):474 ContactsPage().click_always_allowed()475 ContactsPage().click_search_box()476 ContactListSearchPage().input_search_keyword('测试1')477 ContactListSearchPage().click_contact('测试1')478 time.sleep(2)479 @tags('All', 'CMCC')480 def test_contacts_0196(self):481 """群聊列表展示页面选择一个群分享"""482 ContactListSearchPage().click_share_card()483 SelectContactsPage().click_select_one_group()484 SelectOneGroupPage().select_one_group_by_name('测试群1')485 SelectOneGroupPage().is_text_present('发送名片')486 SelectOneGroupPage().click_share_business_card()487 #返回消息页面488 ContactDetailsPage().click_back_icon()489 ContactListSearchPage().click_back()490 ContactsPage().click_message_icon()491 @staticmethod492 def setUp_test_contacts_0197():493 Preconditions.connect_mobile('Android-移动')494 current_mobile().hide_keyboard_if_display()495 Preconditions.make_already_in_message_page()496 MessagePage().click_contacts()497 if ContactsPage().is_text_present('需要使用通讯录权限'):498 ContactsPage().click_always_allowed()499 ContactsPage().click_search_box()500 ContactListSearchPage().input_search_keyword('测试1')501 ContactListSearchPage().click_contact('测试1')502 ContactDetailsPage().click_share_business_card()503 @tags('All', 'CMCC')504 def test_contacts_0197(self):505 """群聊列表展示页面选择本地联系人分享"""506 SelectContactsPage().select_local_contacts()507 SelectContactsPage().page_should_contain_text('选择联系人')508 SelectContactsPage().page_should_contain_text('搜索或输入手机号')509 #无搜索结果时,下方是否展示:无搜索结果510 SelectContactsPage().click_search_keyword()511 SelectContactsPage().input_search_keyword('文本')512 SelectContactsPage().is_text_present('无搜索结果')513 time.sleep(2)514 #存在搜索结果时,判断显示是否正确515 SelectContactsPage().click_x_icon()516 time.sleep(1)517 SelectContactsPage().input_search_keyword('测试2')518 SelectContactsPage().select_one_contact_by_name('测试2')519 SelectContactsPage().click_share_card()520 #返回消息页面521 ContactDetailsPage().click_back_icon()522 ContactListSearchPage().click_back()523 ContactsPage().click_message_icon()524 @staticmethod525 def setUp_test_contacts_0198():526 Preconditions.connect_mobile('Android-移动')527 current_mobile().hide_keyboard_if_display()528 Preconditions.make_already_in_message_page()529 MessagePage().click_contacts()530 if ContactsPage().is_text_present('需要使用通讯录权限'):531 ContactsPage().click_always_allowed()532 ContactsPage().click_search_box()533 ContactListSearchPage().input_search_keyword('测试1')534 ContactListSearchPage().click_contact('测试1')535 ContactDetailsPage().click_share_business_card()536 @tags('All', 'CMCC')537 def test_contacts_0198(self):538 """选择本地联系人分享名片"""539 select_contact=SelectContactsPage()540 select_contact.select_local_contacts()541 select_contact.select_one_contact_by_name('测试2')542 time.sleep(2)543 select_contact.page_should_contain_text('发送名片')544 select_contact.click_share_card()545 #返回消息页面546 ContactDetailsPage().click_back_icon()547 ContactListSearchPage().click_back()548 ContactsPage().click_message_icon()549 @staticmethod550 def setUp_test_contacts_0201():551 Preconditions.connect_mobile('Android-移动')552 current_mobile().hide_keyboard_if_display()553 Preconditions.make_already_in_message_page()554 MessagePage().click_contacts()555 if ContactsPage().is_text_present('需要使用通讯录权限'):556 ContactsPage().click_always_allowed()557 ContactsPage().click_search_box()558 ContactListSearchPage().input_search_keyword('测试1')559 ContactListSearchPage().click_contact('测试1')560 ContactListSearchPage().click_share_card()561 @tags('All', 'CMCC')562 def test_contacts_0201(self):563 """选择和通讯录联系人联系人分享名片"""564 SelectContactsPage().click_he_contacts()565 time.sleep(2)566 SelectContactsPage().page_should_contain_text('未加入企业')567 #返回消息页面568 HeContactsPage().click_back()569 SelectContactsPage().click_back()570 ContactDetailsPage().click_back_icon()571 ContactListSearchPage().click_back()572 ContactsPage().click_message_icon()573 @staticmethod574 #和飞信联系人里面已经有超过3个已测试开始的联系人,同时有超过3个群名称包含测试字段的群组575 def setUp_test_contacts_0207():576 Preconditions.connect_mobile('Android-移动')577 current_mobile().hide_keyboard_if_display()578 Preconditions.make_already_in_message_page()579 MessagePage().click_contacts()580 if ContactsPage().is_text_present('需要使用通讯录权限'):581 ContactsPage().click_always_allowed()582 ContactsPage().click_search_box()583 ContactListSearchPage().input_search_keyword('测试1')584 ContactListSearchPage().click_contact('测试1')585 ContactDetailsPage().click_share_business_card()586 @tags('All', 'CMCC')587 def test_contacts_0207(self):588 """分享名片时,搜索结果多于3人"""589 select_contacts=SelectContactsPage()590 #输入'测试'进行搜索,搜索结果显示情况591 select_contacts.click_search_keyword()592 select_contacts.input_search_keyword('测试')593 select_contacts.hide_keyboard()594 select_contacts.page_should_contain_text('搜索和通讯录联系人')595 select_contacts.page_should_contain_text('本地联系人')596 select_contacts.page_should_contain_text('查看更多')597 select_contacts.page_should_contain_text('群聊')598 #选择本地联系人是否会弹出弹框 #是否弹出弹框未检测599 select_contacts.select_one_contact_by_name('测试1')600 select_contacts.is_text_present('发送名片')601 select_contacts.click_share_card()602 #选择群联系人是否会出现弹框 是否弹出弹框未检测603 ContactDetailsPage().click_share_business_card()604 select_contacts.click_search_keyword()605 select_contacts.input_search_keyword('测试')606 select_contacts.hide_keyboard()607 select_contacts.select_one_group_by_name('测试群1')608 select_contacts.is_text_present('发送名片')609 select_contacts.click_share_card()610 #点击查看按钮,是否会展示折叠的搜索结果611 ContactDetailsPage().click_share_business_card()612 select_contacts.click_search_keyword()613 select_contacts.input_search_keyword('测试')614 select_contacts.hide_keyboard()615 select_contacts.click_read_more()616 time.sleep(2)617 select_contacts.page_should_contain_text('测试4')618 select_contacts.select_one_contact_by_name('测试4')619 select_contacts.click_share_card()620 #返回消息页面621 ContactDetailsPage().click_back_icon()622 ContactListSearchPage().click_back()623 ContactsPage().click_message_icon()624 @staticmethod625 def setUp_test_contacts_0208():626 Preconditions.connect_mobile('Android-移动')627 current_mobile().hide_keyboard_if_display()628 Preconditions.make_already_in_message_page()629 MessagePage().click_contacts()630 if ContactsPage().is_text_present('需要使用通讯录权限'):631 ContactsPage().click_always_allowed()632 ContactsPage().click_search_box()633 ContactListSearchPage().input_search_keyword('测试1')634 ContactListSearchPage().click_contact('测试1')635 ContactListSearchPage().click_share_card()636 @tags('All', 'CMCC')637 def test_contacts_0208(self):638 """选择最近聊天中的联系人,可分享名片"""639 select_contacts = SelectContactsPage()640 select_contacts.select_one_recently_contact_by_name('测试2')641 time.sleep(1)642 select_contacts.page_should_contain_text('发送名片')643 select_contacts.click_share_card()644 #返回消息页面645 ContactDetailsPage().click_back_icon()646 ContactListSearchPage().click_back()647 ContactsPage().click_message_icon()648 @staticmethod649 def setUp_test_contacts_0209():650 Preconditions.connect_mobile('Android-移动')651 current_mobile().hide_keyboard_if_display()652 Preconditions.make_already_in_message_page()653 MessagePage().click_contacts()654 if ContactsPage().is_text_present('需要使用通讯录权限'):655 ContactsPage().click_always_allowed()656 ContactsPage().click_search_box()657 ContactListSearchPage().input_search_keyword('测试1')658 ContactListSearchPage().click_contact('测试1')659 ContactListSearchPage().click_share_card()660 @tags('All', 'CMCC')661 def test_contacts_0209(self):662 """选择最近聊天中的群,可分享名片"""663 select_contacts = SelectContactsPage()664 select_contacts.select_one_recently_contact_by_name('测试群1')665 time.sleep(1)666 select_contacts.page_should_contain_text('发送名片')667 select_contacts.click_share_card()668 #返回消息页面669 ContactDetailsPage().click_back_icon()670 ContactListSearchPage().click_back()671 ContactsPage().click_message_icon()672 @staticmethod673 def setUp_test_contacts_0210():674 Preconditions.connect_mobile('Android-移动')675 current_mobile().hide_keyboard_if_display()676 Preconditions.make_already_in_message_page()677 MessagePage().click_contacts()678 if ContactsPage().is_text_present('需要使用通讯录权限'):679 ContactsPage().click_always_allowed()680 ContactsPage().click_search_box()681 ContactListSearchPage().input_search_keyword('测试1')682 ContactListSearchPage().click_contact('测试1')683 ContactListSearchPage().click_share_card()684 @tags('ALL','CMCC')685 def test_contacts_0210(self):686 """联系人选择器 搜索我的电脑"""687 time.sleep(1)688 SelectContactsPage().click_search_contact()689 SelectContactsPage().input_search_keyword('我的电脑')690 SelectContactsPage().hide_keyboard()691 time.sleep(2)692 #返回消息页面693 SelectContactsPage().click_back()694 ContactDetailsPage().click_back()695 ContactListSearchPage().click_back()696 ContactsPage().click_message_icon()697 @staticmethod698 def setUp_test_contacts_0211():699 Preconditions.connect_mobile('Android-移动')700 current_mobile().hide_keyboard_if_display()701 Preconditions.make_already_in_message_page()702 MessagePage().click_contacts()703 if ContactsPage().is_text_present('需要使用通讯录权限'):704 ContactsPage().click_always_allowed()705 ContactsPage().click_search_box()706 ContactListSearchPage().input_search_keyword('测试1')707 ContactListSearchPage().click_contact('测试1')708 ContactListSearchPage().click_share_card()709 @tags('ALL','CMCC')710 def test_contacts_0211(self):711 """联系人选择器 输入陌生手机号码"""712 time.sleep(1)713 select_contact=SelectContactsPage()714 select_contact.click_search_contact()715 select_contact.input_search_keyword('15575256658')716 select_contact.hide_keyboard()717 time.sleep(2)718 select_contact.get_element_text_net_name('未知号码')719 select_contact.get_element_text_net_number('tel:+86')720 time.sleep(2)721 #返回消息页面722 SelectContactsPage().click_back()723 ContactDetailsPage().click_back()724 ContactListSearchPage().click_back()725 ContactsPage().click_message_icon()726 @staticmethod727 def setUp_test_contacts_0321():728 Preconditions.connect_mobile('Android-移动')729 current_mobile().hide_keyboard_if_display()730 Preconditions.make_already_in_message_page()731 MessagePage().click_contacts()732 if ContactsPage().is_text_present('需要使用通讯录权限'):733 ContactsPage().click_always_allowed()734 def test_contacts_0321(self):735 "公众号默认关注公众号检查"736 ContactsPage().click_official_account_icon()737 time.sleep(1)738 official_account = OfficialAccountPage()739 official_account.page_should_contain_text('中国移动10086')740 official_account.page_should_contain_text('和飞信')741 official_account.page_should_contain_text('和飞信团队')742 #返回消息页面743 official_account.click_back()744 ContactsPage().click_message_icon()745 @staticmethod746 def setUp_test_contacts_0322():747 Preconditions.connect_mobile('Android-移动')748 current_mobile().hide_keyboard_if_display()749 Preconditions.make_already_in_message_page()750 MessagePage().click_contacts()751 if ContactsPage().is_text_present('需要使用通讯录权限'):752 ContactsPage().click_always_allowed()753 def test_contacts_0322(self):754 """公众号列表为空"""755 ContactsPage().click_official_account_icon()756 official_account = OfficialAccountPage()757 official_account.click_tag("企业号")758 time.sleep(1)759 official_account.page_should_contain_text('未关注任何企业号')760 official_account.assert_enterprise_account_list_is_empty()761 #返回消息页面762 official_account.click_back()...

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 robotframework-appiumlibrary 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