Function evaluation disabled error on debugging test project

4 posts, 0 answers
  1. Arooj
    Arooj avatar
    4 posts
    Member since:
    May 2011

    Posted 25 Aug 2011 Link to this post

    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
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 26 Aug 2011 Link to this post

    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!
  3. Arooj
    Arooj avatar
    4 posts
    Member since:
    May 2011

    Posted 29 Aug 2011 Link to this post

    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.
  4. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 29 Aug 2011 Link to this post

    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!
Back to Top