I have menu Home when I expand that it will list two items this one works good when i do manually but i use to get the following error when I try to automate using code or teststudio at this particular step i get the error.
below is the code and error message.Thanks in advacne for the help
Note : I have attached the screenshot of the TestStudio.
public void
menuHome_UIvalidation()
{
FrameworkElement a = this.App.Find.ByTextContent("Home" );
a.User.Click();
var menuSubItem_Approvals = this.App.Find.ByTextContent("Approvals");
Assert.IsTrue(menuSubItem_Approvals.TextContent == "Approvals");
ClassLibrary2.Homepage_Navigation.menuHome_UIvalidation:
System.ApplicationException : Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Silverlight',Info:'NotSet',Action:'NotSet',Target:'ElementId (tagName: 'object',occurrenceIndex: '0')',Data:'{"Method":null,"Property":null,"Reference":null,"Reference2":null,"Type":12,"Value":null}',ClientId:'Client_6405d7ad-8b7b-4492-add5-0cd10e0c8eed',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetAllVisualTrees()
at ArtOfTest.WebAii.Silverlight.SilverlightApp.RefreshVisualTrees()
at ArtOfTest.WebAii.Silverlight.VisualFind.RefreshRoot()
at ArtOfTest.WebAii.Silverlight.VisualWait.WaitForExistsByFindInfo(VisualFindInfo findInfo)
at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)