在self.Select_All_Templates.click_input()
中,print_control_identifiers
有一个COMError。当我升级到0.6.4版本时,COMError消失但我收到ElementNotFound错误,但是pywinauto.findwindows.ElementNotFoundError: {'control_type': 'CheckBox', 'title': 'Select All Templates', 'top_level_only': False, 'parent': <uia_element_info.UIAElementInfo - '', , None>, 'backend': u'uia'}
调用显示child_windows是正确的。当我删除网格中的所有列表,并再次运行代码时,错误消失了。
my GUI--picture
class Pywin(object):
def __init__(self):
self.app = application.Application(backend="uia")
def controlor(self):
self.about_dlg = self.app.window(class_name="Qt5QWindowIcon")
self.Select_All_Templates = self.about_dlg["Pane"].child_window(title="Select All Templates", control_type="CheckBox")
# self.Select_All_Templates = self.about_dlg["Select All Templates"]
def dlg(self):
# self.Select_All_Templates.wrapper_object().click_input()
self.Select_All_Templates.click_input()
def connect(self, window_name):
self.app.connect(path = window_name)
time.sleep(1)
if __name__ == "__main__":
app = Pywin()
tool_name = "FingerPrint EVK Client *"
window_name = r"E:\EVK\EVK\FingerPrintEVK_V1.19.10 Beta20\FingerPrintEVK_V1.19.10 Beta20.exe"
app.connect(window_name)
app.controlor()
app.dlg()
return Observable.interval(this.pollInterval)
.mergeMap(() => this.http.get(this.apiUrl + '/poll'))
.first(data => data) // This is where the error occurs in HttpClient
.map(result => result)
.timeout(20000)
.catch(this.errorHandler);