Пример #1
0
 def __init__(self):
     self.info = Information()
     self.my_andriod_poco = MyPocoObject()
     self.eg = EntryGame()
     self.phone_name = self.info.get_phone_name()
     self.use_name = self.info.get_config("Account_Number", "YzTest2")
     self.game_name = self.info.get_config("App_Name", "game_name")
     # 获取设备型号
     self.high = self.info.get_config("Phone_Model", "high")
     self.medium = self.info.get_config("Phone_Model", "medium")
     self.low = self.info.get_config("Phone_Model", "low")
     self.test = self.info.get_config("Phone_Model", "test")
     self.high_touch_x = self.info.get_config("Coordinate", "high_start_x")
     self.high_touch_y = self.info.get_config("Coordinate", "high_start_y")
     self.medium_touch_x = self.info.get_config("Coordinate", "medium_start_x")
     self.medium_touch_y = self.info.get_config("Coordinate", "medium_start_y")
     self.low_touch_x = self.info.get_config("Coordinate", "low_start_x")
     self.low_touch_y = self.info.get_config("Coordinate", "low_start_y")
     self.test_touch_x = self.info.get_config("Coordinate", "test_start_x")
     self.test_touch_y = self.info.get_config("Coordinate", "test_start_y")
     self.high_end_x = self.info.get_config("Coordinate", "high_end_x")
     self.high_end_y = self.info.get_config("Coordinate", "high_end_y")
     self.medium_end_x = self.info.get_config("Coordinate", "medium_end_x")
     self.medium_end_y = self.info.get_config("Coordinate", "medium_end_y")
     self.low_end_x = self.info.get_config("Coordinate", "low_end_x")
     self.low_end_y = self.info.get_config("Coordinate", "low_end_y")
     self.test_end_x = self.info.get_config("Coordinate", "test_end_x")
     self.test_end_y = self.info.get_config("Coordinate", "test_end_y")
     self.game_name = self.info.get_config("App_Name", "game_name")
Пример #2
0
 def __init__(self):
     """
     在if、elif结构中初始化对象
     """
     self.info = Information()
     self.my_poco = MyPocoObject()
     self.game_name = self.info.get_config("App_Name", "game_name")
     if self.game_name == "com.youzu.test.qa":
         self.rgss2 = ResourceGmSs2()
     else:
         pass
Пример #3
0
 def __init__(self):
     """
     初始化点击类、信息类、性能类
     """
     self.my_poco = MyPocoObject()
     self.info = Information()
     self.xn = YzTest2Performance()
     self.eg = EntryGame()
     self.fg = Fight()
     self.rg = ResourceGm()
     self.na = NewAccount()
     self.sp = Protocol()
     self.mrc = MyRunCase()
Пример #4
0
 def __init__(self):
     self.info = Information()
     self.my_poco = MyPocoObject()
     self.uw = UnexpectedWinSs2()
Пример #5
0
 def __init__(self):
     self.info = Information()
     self.my_poco = MyPocoObject()
 def __init__(self):
     self.info = Information()
     self.my_poco = MyPocoObject()
     self.game_name = self.info.get_config("App_Name", "game_name")
     self.sever_poco = self.info.get_config("Sever_poco", self.game_name)
 def __init__(self):
     self.info = Information()
     self.rg = ResourceGm()
     self.my_poco = MyPocoObject()
     self.game_name = self.info.get_config("App_Name", "game_name")
Пример #8
0
 def __init__(self):
     self.info = Information()
     self.my_poco = MyPocoObject()
     self.game_name = self.info.get_config("App_Name", "game_name")
     self.poco = StdPoco()
     self.my_poco.set_poco(self.poco)
Пример #9
0
    def first_function_go_run_ss2(self):
        """
        用来跳过一些功能初次进入的引导动画
        :return:
        """
        my_poco = MyPocoObject()
        poco = StdPoco()
        my_poco.set_poco(poco)
        my_poco.find_poco(poco("Comp_dungeon").child("Btn_dungeon"),
                          find_type="obj")  # 副本
        try:
            for i in range(2):
                sleep(3)
                my_poco.find_poco(poco("ComTopBar").child("Btn_home"),
                                  find_type="obj")
        except Exception:
            pass
        my_poco.find_poco("HomeBioBtnComp", find_type="name")  # 列传
        try:
            for i in range(10):
                try:
                    my_poco.find_poco("BtnSkip", find_type="name")
                except Exception:
                    try:
                        my_poco.find_poco("Btn_return", find_type="name")
                    except Exception:
                        pass
            sleep(5)
            my_poco.find_poco(poco("ComTopBar").child("Btn_home"),
                              find_type="obj")

        except Exception:
            pass

        my_poco.find_poco("Btn_pvp", find_type="name")
        my_poco.find_poco("竞技场")
        try:
            for i in range(2):
                sleep(5)
                my_poco.find_poco(poco("ComTopBar").child("Btn_home"),
                                  find_type="obj")
        except Exception:
            pass
        my_poco.find_poco("Btn_pvp", find_type="name")
        my_poco.find_poco("无双试炼")
        try:
            for i in range(3):
                sleep(5)
                my_poco.find_poco(poco("ComTopBar").child("Btn_home"),
                                  find_type="obj")
        except Exception:
            pass
        my_poco.find_poco("Btn_pvp", find_type="name")
        my_poco.find_poco("讨伐巨兽")
        try:
            for i in range(2):
                sleep(5)
                my_poco.find_poco(poco("ComTopBar").child("Btn_home"),
                                  find_type="obj")
        except Exception:
            pass
        my_poco.find_poco("Btn_pvp", find_type="name")
        my_poco.my_swipe(poco(text="讨伐巨兽"), poco(text="竞技场"))
        my_poco.find_poco("秘境寻宝")  # 秘境寻宝
        try:
            for i in range(2):
                sleep(5)
                my_poco.find_poco(poco("ComTopBar").child("Btn_home"),
                                  find_type="obj")
        except Exception:
            pass