Ejemplo n.º 1
0
 def create_message_group(self,text='aaa'):
     time.sleep(2)
     mess = MessagePage()
     mess.wait_for_page_load()
     # 点击 +
     mess.click_add_icon()
     # 点击 发起群聊
     mess.click_group_chat()
     # 选择联系人界面,选择一个群
     sc = SelectContactsPage()
     sc.click_select_one_group()
     time.sleep(1)
     from pages.groupset.GroupChatSet import GroupChatSetPage
     if self.get_elements(self.__locators['aaa']):
         self.click_element(self.__locators['aaa'])
         time.sleep(1)
         gcp = GroupChatPage()
         group_set = GroupChatSetPage()
         time.sleep(1)
         gcp.click_setting()
         time.sleep(1)
         sc.page_up()
         time.sleep(1)
         group_set.click_delete_and_exit()
         time.sleep(3)
     else:
         self.click_back_by_android()
     # mess.click_create_group()
     # 点击 +
     mess.click_add_icon()
     # 点击 发起群聊
     mess.click_group_chat()
     mess.click_contact_group()
     mess.click_text("大佬2")
     time.sleep(1)
     mess.click_text("大佬3")
     time.sleep(1)
     mess.click_sure_button()
     time.sleep(1)
     mess.click_group_name()
     time.sleep(1)
     mess.set_group_name(text=text)
     time.sleep(1)
     mess.click_sure_button()
     time.sleep(1)
Ejemplo n.º 2
0
 def create_message_group2(self,text='aaa'):
     time.sleep(2)
     mess = MessagePage()
     mess.wait_for_page_load()
     # 点击 +
     #删除原来的群
     mess.click_add_icon()
     # 点击 发起群聊
     mess.click_group_chat()
     # 选择联系人界面,选择一个群
     time.sleep(1)
     mess.click_contact_group()
     mess.click_text("大佬2")
     time.sleep(1)
     mess.click_text("大佬3")
     time.sleep(1)
     mess.click_sure_button()
     time.sleep(1)
     mess.click_group_name()
     time.sleep(1)
     mess.set_group_name(text=text)
     time.sleep(1)
     mess.click_sure_button()
     time.sleep(1)