I'm trying to evalute the Telerik testing framework for silverlight automation.I'm running into a few issues.
Following is the sample code that I am using.
Settings settings = GetSettings();settings.Web.DefaultBrowser = BrowserType.InternetExplorer;settings.Web.EnableSilverlight = true;Initialize(settings, new TestContextWriteLine(this.TestContext.WriteLine));Manager.LaunchNewBrowser();ActiveBrowser.NavigateTo("http://localhost/TestSLAppTestPage.html");ActiveBrowser.WaitUntilReady();var slApp = ActiveBrowser.SilverlightApps()[0];Assert.IsNotNull(slApp);var button = slApp.FindName<Button>("button1");Assert.IsTrue(button.Text.Equals("Click Me"));
When I run this test it passes but I am unable to debug it. When I put a breakpoint at ActiveBrowser.SilverlightApps line and try to evaluate the object returned by the method it gives an error saying that Function evaluation timed out. and Function evaluation disabled because a previous function timed out.
Also i see the following exception in the output.
Error: PipeCommunication.AsyncPipeRead() : EXCEPTION ("Pipe Null State: False")
Type: System.Threading.ThreadAbortException
Message: Thread was being aborted.
Call Stack:
at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne()
at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.AsyncPipeRead(PipeStream pipe, Byte[] bytes, Int32 offset, Int32 count)
The program '[7604] QTAgent32.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
I am using Testing framework version 2011.1.817 that is in beta. I also tried the 2011.1.712 version. I encountered similar issues.
Does the framework support XBAP automation?
Thanks.
Regards,
Arooj