Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Automation UIAComWrapper API相关方法在Windows 10上引发元素不可用异常_Automation - Fatal编程技术网

Automation UIAComWrapper API相关方法在Windows 10上引发元素不可用异常

Automation UIAComWrapper API相关方法在Windows 10上引发元素不可用异常,automation,Automation,我在代码FindFirst()、FindALL()和GetParent()中使用与UIAComWrapper.dll相关的方法 每个方法都随机抛出ElementNotAvailableException 例外情况如下: System.Windows.Automation.ElementNotAvailableException was caught HResult=-2147220991 Message=Element not available Source=UiaComWrap

我在代码FindFirst()、FindALL()和GetParent()中使用与UIAComWrapper.dll相关的方法

每个方法都随机抛出ElementNotAvailableException

例外情况如下:

 System.Windows.Automation.ElementNotAvailableException was caught
  HResult=-2147220991
  Message=Element not available
  Source=UiaComWrapper 


   InnerException: System.Runtime.InteropServices.COMException
    ErrorCode=-2146233083
   HResult=-2146233083
   Message=Operation timed out. 

  (Exception from HRESULT: 0x80131505)
    Source=Interop.UIAutomationClient

   StackTrace:
        at     UIAutomationClient.IUIAutomationTreeWalker.GetParentElementBuildCache(IUIAutomationElement element, IUIAutomationCacheRequest cacheRequest)
        at System.Windows.Automation.TreeWalker.GetParent(AutomationElement element, CacheRequest request)"
问候,

纳加斯利