Sunday, 13 July 2014

How to Know Silverlight Application is working for Coded UI Test or not

Error
The playback failed to find the control with the given search properties. Additional Details: \r\nTechnologyName: 'Silverlight'\r\nControlType: 'BusyIndicator'\r\n"}

ErrorNo Silverlight controls were detected. Verify that the application under test is built using Silverlight assemblies with a version of 4.0 or greater and that a reference to the Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll assembly has been added to the project. For more information, see http://go.microsoft.com/fwlink/?LinkId=204562
No SilverLight controls were detected.
Open VS-->Create New Project-->Select Test in left menu (Templates)-->Test Project-->Give any name.
In the VS click on Test -->Select New Test-->Select Coded UI Test Template.
Give some name.
You will get a prompt.
Select “Record Actions, edit UI map or add assertions” option.
Open IE browser, enter Silverlight Application URL.
In the right down corner you will find a RED button
Click on “Start Recording”.
Now in the Silverlight Page Click on any Silverlight Textbox or button or dropdown.
If you get below error then your Silverlight Application is not having Code UI Test Supported dll.
Add Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll to your Silverlight Application then run above steps it will work fine.
No SilverLight controls were detected

Solution: Add Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll to your Silverlight Application then run above steps it will work fine.