Bläddra i källkod

fix: Make sure the courtyard scroll is open

Chino dentist Ko 2 år sedan
förälder
incheckning
f3a7e6e777
1 ändrade filer med 10 tillägg och 0 borttagningar
  1. 10 0
      tasks/GameUi/game_ui.py

+ 10 - 0
tasks/GameUi/game_ui.py

@@ -11,6 +11,7 @@ from module.atom.ocr import RuleOcr
 
 from tasks.GameUi.assets import GameUiAssets
 from tasks.GameUi.page import *
+from tasks.Restart.assets import RestartAssets
 from tasks.base_task import BaseTask
 from module.logger import logger
 from module.exception import (GameNotRunningError, GamePageUnknownError, RequestHumanTakeover)
@@ -69,6 +70,12 @@ class GameUi(BaseTask, GameUiAssets):
         """
         return self.appear(page.check_button)
 
+    def ensure_scroll_open(self):
+        """
+        判断庭院界面卷轴是否打开
+        """
+        return self.appear(RestartAssets.I_LOGIN_SCROOLL_CLOSE)
+
     def ensure_button_execute(self, button):
         """
         确保button执行
@@ -135,6 +142,9 @@ class GameUi(BaseTask, GameUiAssets):
             #     timeout.reset()
             #     continue
 
+            if self.ensure_scroll_open():
+                self.click(RestartAssets.I_LOGIN_SCROOLL_CLOSE)
+
             app_check()
             minicap_check()
             rotation_check()