locked
Coded UI/UI Test plug-in for Silverlight 5 are failing upon playback. RRS feed

  • Question

  • I am new for CODED UI/UI Test plug-in for Silverlight.

    In my company, I have to automate Silverlight 5, .netframework 4.5, C# Application using Internet Explorer 8.
    I have VS2012 Premium installed.

    As per instructions

    1. Downloaded/Installed UI Test Plug-in.
    2. Added a reference SilverlightUIAutomationHelper in Silverlight application.
    3. Verified that each Silverlight Control has a unique identification property.
    3. Created CODED-UI test application for automation testing.
    4. Added a reference Microsoft..Extension.Silverlight in CODED-UI Test application.

    CodedUI-TestMethod (Launch Silverlight Application)

    1. Open internet explorer browser
    2. Displays Company's home page
    3. Paste application URL in browser window
    4. Successfully launches Silverlight Application

    I can record/Play fine, while playback getting following error

    Test Name:    LaunchApp
    Test FullName:    SAMPROSprint1.CodedUITest1.LaunchApp
    Test Source:    \\..\My Documents\Visual Studio 2012\Projects\SAMPROSprint1\SAMPROSprint1\CodedUITest1.cs : line 27
    Test Outcome:    Failed
    Test Duration:    0:00:30.3743073

    Result Message:    
    Test method SAMPROSprint1.CodedUITest1.LaunchApp threw exception:
    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: Unable to find the top level element of the control ---> Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: Unable to find Windows Internet Explorer window with 'Distribution Strategies & Services Group - Teamworks - Windows Internet Explorer' in the title. ---> Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
    TechnologyName:  'MSAA'
    ControlType:  'Window'
    Name:  'XYZ' (Company Home Page)
    ClassName:  'IEFrame'
     ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

    I found a solution for this, but still my test is failing and throwing above exception.
    http://social.msdn.microsoft.com/Forums/en-US/e8181a58-a189-4731-989e-6465e4f0d60c/playback-fails-with-error?forum=vsautotest
    http://blogs.msdn.com/b/mathew_aniyan/archive/2011/03/01/smart-match-amp-slow-coded-ui-tests.aspx

    Please provide a solution for this. Thanks in advance.

    Tuesday, September 2, 2014 9:29 PM

Answers

  • Hi,

    I think this may be caused by your application.
    Your could debug your application for loacating the problem.

    Besides, here has some tutorial about Microsoft Visual Studio 2013 Coded UI Test Plugin for Silverlight,please have a see:

    http://visualstudiogallery.msdn.microsoft.com/51b4a94a-1878-4dcc-81e0-7dc92131d2da

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.




    • Marked as answer by Jonny_D Wednesday, September 10, 2014 1:41 AM
    Thursday, September 4, 2014 9:00 AM