遇到报错信息:
E:\python3.7.5\lib\site-packages\pywinauto\application.py:1076: RuntimeWarning: Application is not loaded correctly (WaitForInputIdle failed)
warnings.warn('Application is not loaded correctly (WaitForInputIdle failed)', RuntimeWarning)
要如何解决。
报错代码段如下所示:
def open(self): while True: try: self.app: Application = Application(backend="uia").start("javaw -jar " + self._jar) time.sleep(30) self.top_window = self.app.top_window() self.top_window.wait('ready', timeout=2, retry_interval=0.5) break except Exception as e: self.app.kill() time.sleep(1)