Telerik Forums
Testing Framework Forum
8 answers
218 views
I am trying to write  automation scrip to verify the silverlight UI .
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.HoverOver();

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)

 

 

 

Vladislav
Telerik team
 answered on 31 May 2011
1 answer
113 views
I've run into a problem where my tests can run x number of times in a row, with 0 changes in my code / silverlight application.  Sometimes the tests will pass, sometimes they will fail, and it's never a consistent failure, it's always something different each time.  I'm trying to debug why the tests sometime fails, and I can't really pinpoint a good way to debug it.  Can someone share some pointers on the best way to debug all these tests and why they are so flaky?

Thanks
Stoich
Telerik team
 answered on 28 May 2011
1 answer
110 views
Is webaii is still adaptable to silverlight version 4.
Anthony
Telerik team
 answered on 26 May 2011
1 answer
137 views
Hello, 
 
In the most recent build 2011.1.502 I seem to be getting this error on our Script Execution machines (Running the Visual Studio Test Agents) whenever a Dialog appears. This is causes the Agent process to stop. I've attached the TRX file that logged the Run.

The DialogMonitor is currently set  to (settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;)

Error:
Exception: NullReferenceException
Message: Object reference not set to an instance of an object.
Stack Trace:
   at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.HandleUnexpectedDialog(Window dialogWindow)
   at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.HandleDialog(Window dialogWindow)
   at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.AutomationEvent_OnWindowOpened(Object sender, WindowEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at ArtOfTest.WebAii.Win32.UIAutomationWindowMonitor.OnWindowOpened(Window window)
   at ArtOfTest.WebAii.Win32.UIAutomationWindowMonitor.HandleAutomationEvent(Object sender, AutomationEventArgs e)
   at MS.Internal.Automation.InvokeHandlers.InvokeClientHandler(Delegate clientCallback, AutomationElement srcEl, AutomationEventArgs args)
   at MS.Internal.Automation.ClientSideQueueItem.Process()
   at MS.Internal.Automation.QueueProcessor.DrainQueue()
   at MS.Internal.Automation.QueueProcessor.WaitForWork()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()






Stoich
Telerik team
 answered on 26 May 2011
3 answers
117 views
Is webaii testing framework suitable for Automating windows application ??
Anthony
Telerik team
 answered on 25 May 2011
3 answers
106 views
Does WebAii supports Image content testing? we can do image comparison but is there a way to get the contents of the image through webaii automation??

Thanks,
Naveen
Stoich
Telerik team
 answered on 25 May 2011
5 answers
293 views
Getting the Error message while executing the test cases on the build server, what could be the problem for this error as the tests are executing good till yesterday morning we are geting this problem from yesterday evening.
Looks getting the problem while taking the snapshot.

executing fine while execute from other systems on the build platform.

Getting the Error message :

Overall Result: Fail
System.OutOfMemoryException: Out of memory.

Server stack trace:
   at System.RuntimeMethodHandle._SerializationInvoke(IRuntimeMethodInfo method, Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
   at System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage.FixupForNewAppDomain()
   at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at ArtOfTest.WebAii.Design.Execution.ITestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType, Int32 lastStepIndex, DebuggerOptions debuggerOptions)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTest(Test testcase, Settings settings, String testBinaryFolder, String deploymentFolder, ExecutionType exeType, Int32 lastStepIndex, DebuggerOptions debuggerOptions)
------------------------------------------------------------
'04/05/2011 16:40:05' - Overall Result: Fail
'04/05/2011 16:40:05' - Duration: [0 min: 0 sec: 0 msec]
------------------------------------------------------------
Konstantin Petkov
Telerik team
 answered on 23 May 2011
4 answers
115 views
Hello,

When I'm trying to run my firefox in invisible mode and I'm calling NavigateTo, I get a NullReferenceException:

Settings mySettings = new Settings(BrowserType.FireFox, @"C:\browserlog\");
Manager myManager = new Manager(mySettings);         
myManager.Start();
myManager.LaunchNewBrowser(BrowserType.FireFox, true, System.Diagnostics.ProcessWindowStyle.Hidden);
myManager.ActiveBrowser.NavigateTo("http://www.google.com");


If I choose ProcessWindowStyle.Normal everything works fine. Could you please advise, if and how it is possible to run Firefox in invisble mode?

Many Thanks
Thomas
Konstantin Petkov
Telerik team
 answered on 23 May 2011
7 answers
111 views
In the latest version download dialog processing seems to be broken even in older browsers :(

Run this piece of code in IE8: 
[TestFixture]
public class Class1
{
 
    [Test]
    public void A() {
        new Manager(false).Start();
 
        var m = Manager.Current;           
        m.LaunchNewBrowser(BrowserType.InternetExplorer);
 
        var b = m.ActiveBrowser;
 
        var h = new DownloadDialogsHandler(b, DialogButton.SAVE, "C:\\PQZHoldings.csv", m.Desktop);
 
        HtmlAnchor a = b.Find.ByExpression<HtmlAnchor>("id=ctl00_MainPageLeft_MainPageContent_ExportHoldings1_LinkButton1", "tagname=a");
        a.Click(false);
        h.WaitUntilHandled(10000);                       
    }
}

File download prompt appears and then closes. In 10 seconds I get a timeout error.
I still have to use the old ArtOfTest 2.0 release...



Alexey Ivanov
Top achievements
Rank 1
 answered on 20 May 2011
1 answer
82 views
Hello!

On one of my machines I got this exception when ran tests in Firefox.
I analyzed this method using Reflector and understood that you search FF installations in the registry.

For some reason under HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\ I had two keys: 3.6.13 and 3.6.17.
I fixed the problem by manually deleting 3.6.13 key. 

I suggest you to add more sanity checks when analyzing keys!
Anthony
Telerik team
 answered on 19 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?