This is a migrated thread and some comments may be shown as answers.

Function evaluation disabled error on debugging test project

3 Answers 78 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Arooj
Top achievements
Rank 1
Arooj asked on 25 Aug 2011, 06:55 PM
Hi,

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

3 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 26 Aug 2011, 11:17 PM
Hello Arooj,

Your suspicions are correct; the framework does not support XBAP automation. Please see the bottom of this page for more information.

Regards,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Arooj
Top achievements
Rank 1
answered on 29 Aug 2011, 03:30 PM
Thanks Anthony.

I'm still not able to debug my code for a simple silverlight application. Would you kindly see the code in the last post and see if i'm doing something wrong.
0
Anthony
Telerik team
answered on 29 Aug 2011, 05:01 PM
Hi Arooj,

Your code looks fine. The debugging trouble you are experiencing in Silverlight is a known issue. The Framework is a middle-man between Visual Studio and the Silverlight app, relaying communication. When a breakpoint is reached, the Silverlight hook is blocked and cannot execute. The debugger wants to execute, however, to retrieve values. It can't so that's why you see the timeout.

Greetings,
Anthony
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Tags
General Discussions
Asked by
Arooj
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Arooj
Top achievements
Rank 1
Share this question
or