Automation UIAComWrapper API相关方法在Windows 10上引发元素不可用异常
我在代码FindFirst()、FindALL()和GetParent()中使用与UIAComWrapper.dll相关的方法 每个方法都随机抛出ElementNotAvailableException 例外情况如下: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
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)"
问候,
纳加斯利