You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BB
Launch Application path=calc.exe
Sleep 10s
Find All Elements //Button
result:
COMException: (0x80040201): An event was unable to invoke any of the subscribers (Exception from HRESULT: 0x80040201)
at Interop.UIAutomationClient.IUIAutomationTreeWalker.GetFirstChildElement(IUIAutomationElement element)
at FlaUI.UIA3.UIA3TreeWalker.GetFirstChild(AutomationElement element)
at FlaUI.Core.AutomationElementXPathNavigator.MoveToFirstChild()
at MS.Internal.Xml.XPath.XPathDescendantIterator.MoveNext()
at MS.Internal.Xml.XPath.DescendantQuery.Advance()
at MS.Internal.Xml.XPath.XPathSelectionIterator.MoveNext()
at FlaUI.Core.AutomationElements.AutomationElement.FindAllByXPath(String xPath)
Windows 10 machine
The text was updated successfully, but these errors were encountered:
What you are trying to do is to find all the buttons available in your windows no matter where they are.
In this case it will take long long time for at least 20-30 seconds if you have really no apps other than calc.
According to the error you have provided there is either an app in your windows open which does not support Automation or you have the same app open twice, as the flaui crawled over it, you got the exception. Which is normal!
I suggest you to make sure there is only one calc app open and to use this code instead
BB
Launch Application calc.exe
Sleep 10s
Find All Elements /Window[@Name='Calculator']//Button
and make sure while crawling there is no changes are done to the calc app. Otherwise you may get other exceptions.
result:
Windows 10 machine
The text was updated successfully, but these errors were encountered: