0

当有 2 个元素(例如按钮)时,在 StackOverflow 上找到了一些关于此错误的已回答问题,但在这种情况下,PyWinAuto 说有 2 个 backend:uia 的 ? 我在任何地方都找不到解决方案。

例外:

    okb.click_input()
  File "C:\Python36\lib\site-packages\pywinauto\application.py", line 379, in __getattribute__
    ctrls = self.__resolve_control(self.criteria)
  File "C:\Python36\lib\site-packages\pywinauto\application.py", line 258, in __resolve_control
    criteria)
  File "C:\Python36\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
    func_val = func(*args, **kwargs)
  File "C:\Python36\lib\site-packages\pywinauto\application.py", line 203, in __get_ctrl
    dialog = self.backend.generic_wrapper_class(findwindows.find_element(**criteria[0]))
  File "C:\Python36\lib\site-packages\pywinauto\findwindows.py", line 98, in find_element
    raise exception
pywinauto.findwindows.ElementAmbiguousError: There are 2 elements that match the criteria {'backend': 'uia', 'process': 12796}
4

0 回答 0