Hello,
In my RPA Bot, running the Click on Menu command outputs the error below. What is odd is that the command clicks through the menu and executes perfectly, but this error stops the execution from running further.
System.Windows.Automation.ElementNotAvailableException: Element not available ---> System.Runtime.InteropServices.COMException: An event was unable to invoke any of the subscribers (Exception from HRESULT: 0x80040201)
at UIAutomationClient.IUIAutomationElement.GetCurrentPropertyValueEx(Int32 propertyId, Int32 ignoreDefaultValue)
at System.Windows.Automation.AutomationElement.GetCurrentPropertyValue(AutomationProperty property, Boolean ignoreDefaultValue)
--- End of inner exception stack trace ---
at System.Windows.Automation.AutomationElement.GetCurrentPropertyValue(AutomationProperty property, Boolean ignoreDefaultValue)
at System.Windows.Automation.AutomationElement.GetCurrentPropertyValue(AutomationProperty property)
at System.Windows.Automation.AutomationElement.GetPropertyValue(AutomationProperty property, Boolean cached)
at System.Windows.Automation.AutomationElement.AutomationElementInformation.get_ControlType()
at WDG.Automation.Runtime.Windows.Win32ControlFactory.BuildCore(IntPtr windowHandle, AutomationElement instance, String innerId)
at WDG.Automation.Runtime.Windows.White.WhiteMenuBar.GetControl(String[] captions, Boolean clickOnLastItem, CancellationTimeout cancellationTimeout)
at WDG.Automation.Windows.ClickOnMenuCommand.ExecuteCore(WindowsContext context)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at WDG.Automation.Language.CommandInterpreter.<Run>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at WDG.Automation.Language.ScriptInterpreter.<RunCore>d__17.MoveNext()
------------------------------
Jesus Najera
------------------------------