Exemplo n.º 1
0
 def test_delete_chat(self):
     '''
     这里一定要以test开头,把测试逻辑封装到一个test开头的方法里面。
     :return:
     '''
     long_delete = Home(self.driver)
     try:
         long_delete.long_press_last_message()
         long_delete.get_windows_img()  #
         long_delete.delete_message()
         long_delete.click_delete_btn()
         long_delete.get_windows_img()  #
         time.sleep(2)
     except Exception as e:
         print("Cant find xinlingshou's message,%s" % e)
Exemplo n.º 2
0
 def test_stick_chat(self):
     '''
     这里一定要以test开头,把测试逻辑封装到一个test开头的方法里面。
     :return:
     '''
     long_stick = Home(self.driver)
     try:
         before_home_name = long_stick.get_last_message_name()
         # print(before_home_name)
         long_stick.long_press_last_message()
         long_stick.get_windows_img()  #
         print(long_stick.get_lens_chat())
         if long_stick.get_lens_chat() == 3:
             long_stick.stick_chat(num=1)
         else:
             long_stick.stick_chat(num=0)
         after_home_name = long_stick.get_first_message_name()
         long_stick.get_windows_img()  #
         if before_home_name == after_home_name:
             print("会话置顶成功!")
         else:
             print("会话置顶失败!")
     except Exception as e:
         print("Cant find xinlingshou's message,%s" % e)