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

Coded UI Test not working on gridview cells

11 Answers 148 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 11 Jul 2013, 05:18 AM
Hey guys,

I was trying to do a simple coded UI test on a very simple telerik gridview example, basically just click one cell, edit it then click another cell, then edit , the recording is ok but when I playback it, it always stops on the first cell, and the coded UI test framework throws an exception like following:

Test method CodedUITestProject1.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
TechnologyName:  'Silverlight'
ControlType:  'CheckBox'
 ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Result StackTrace: 

Any idea of what is the root cause?


11 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 11 Jul 2013, 08:40 AM
Hello Kevin,

Currently, there is support for RadGridView for WPF only, not for Silverlight. In fact when you start to record any actions, coded ui test builder displays a message that Microsoft Silverlight is not supported and you will get exactly the same behavior with DataGrid for Silverlight as well. 
Are you workign with this plugin ?

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Kevin
Top achievements
Rank 1
answered on 11 Jul 2013, 11:34 PM
Yes I followed the procedure to setup Silverlight application for testing:

-- http://visualstudiogallery.msdn.microsoft.com/28312a61-9451-451a-990c-c9929b751eb4
-- http://msdn.microsoft.com/en-us/library/gg313838.aspx

recording is ok, the links, buttons on the silverlight page is ok with the recording and playback, but the issue is with the cells in the grid.

so this will not be working at this stage? do you have any plan to make it work in the future version?

The other thing I am looking at is Telerik test automation tool, does it support  automation testing on Telerik  controls well?


Thanks
Kevin

0
Maya
Telerik team
answered on 16 Jul 2013, 04:09 PM
Hi Kevin,

Generally, we officially provide support for Coded UI only for WPF. I will investigate the case to see what the opportunities for Silverlight are and will let you know on the progress.
As for your second question, are you asking about Test Studio and creating Coded UI tests with it ? 

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Kevin
Top achievements
Rank 1
answered on 17 Jul 2013, 12:18 AM
Hey Maya,

Yes I was asking if it supports coded UI test of telerik Silverlight controls.

Thanks
Kevin
0
Maya
Telerik team
answered on 17 Jul 2013, 07:45 AM
Hello Kevin,

Test Studio does support Coded UI for Silverlight. You can check our documentation for further reference. If you plan on recording a test (not just an assertion one), the complexity of the tests depends on the control you want to work with.

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Mayur
Top achievements
Rank 1
answered on 23 Dec 2013, 09:19 AM

 Hey Maya,

 I'm evaluating Test Studio, it's being pretty satisfying but I ran into something very troublesome, and essential to almost any test.

 I have an application in Slverlight that uses a Telerik Rad GridView.

 The test goes like this:
 - Click the cell and enable the textbox 
 - Type in the text box
 The problem is that when Test Studio tries to type the test fails, because it does not find the Textbox.

 Error Message logged:

------------------------------------------------------------

Failure Information:

~~~~~~~~~~~~~~~

Unable to find the specified element: Unable to find the element of type: textbox

InnerException:

ArtOfTest.Common.Exceptions.FindElementException: Unable to find the specified element: Unable to find the element of type: textbox

   at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType, Point offsetPoint, OffsetReference reference)

   at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType)

   at ArtOfTest.WebAii.Controls.Xaml.XamlControlHelper.SetText(String propertyName, FrameworkElement xamlControl, Boolean simulateRealUser, String text, Int32 keyPressTime, Int32 keyHoldTime, Boolean fireKeyEvents, Boolean clearCurrentText)

   at ArtOfTest.WebAii.Silverlight.UI.TextBox.SetText(Boolean simulateRealUser, String text, Int32 keyPressTime, Int32 keyHoldTime, Boolean fireKeyEvents)

   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.TextBoxSetTextActionDescriptor.Execute(IApplication hostApp)

   at ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost autoHost)

   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

------------------------------------------------------------

'12/23/2013 11:06:48 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.”

 Query:

 - Does Telerik Test Studio support Silverlight and the Grid View controls?

 If yes I request you to please provide some solution over this problem, because I am not able to move ahead on my automation without this support.

 

 

 Note:

  1. Test studio detects GridViewComboBoxColumn without any problem.

  2. Another thing is that recording works fine, but while executing the test it fails.

  3. My application require a single to enable the text box.



 Thanks
 Mayur
0
Maya
Telerik team
answered on 26 Dec 2013, 08:33 AM
Hi Mayur,

We are aware of similar issue and we are investigating the cause of it. I will write back as soon as we have more information on it.


Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Patrick
Top achievements
Rank 1
answered on 24 Mar 2014, 07:55 PM
Do Telerik radgrids work with coded UI tests for Windows forms?  I am having trouble. 
0
Stephen
Top achievements
Rank 1
answered on 26 Mar 2014, 11:41 AM
On the same topic as Patrick above:

I'm also having issues getting RadGridView to work with Visual Studio's Coded UI Testing.

I note that the tech sheet for Telerik UI for WinForms located here lists that RadGridView works on all levels of Coded UI Test Framework.

However the problem I face is that trying to carry out any keyboard or mouse events using the Visual Studio Coded UI Test builder causes the test builder to stop responding and close. Additionally trying to carry out any assertions using the Visual Studio Coded UI Test builder also causes the test builder to stop responding and close.

The Telerik version used is Q3 2013.

If you require more information feel free to ask.
0
Stephen
Top achievements
Rank 1
answered on 26 Mar 2014, 11:44 AM
Seems the link has been removed for "I note that the tech sheet for Telerik UI for WinForms located [LINK]here[/LINK]"

The link is: http://www.telerik.com/winforms/tech-sheets/accessibility-support
0
George
Telerik team
answered on 27 Mar 2014, 12:59 PM
Hi Stephen,

Thank you for contacting us.

We have not received such reports, regarding a crashing test builder when using our suite. Can you please check if you have any other possibly conflicting applications started as well as with other Visual Studio version. You can also try to create a new application and see if that will cause any troubles. And finally, make sure that you have set the EnableCodedUITests property to true.

If you still experience difficulties, please provide me with additional details about your Visual Studio Version, OS version and possibly with a sample application where the problem is reproducible.

Looking forward to your reply.

Regards,
George
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
GridView
Asked by
Kevin
Top achievements
Rank 1
Answers by
Maya
Telerik team
Kevin
Top achievements
Rank 1
Mayur
Top achievements
Rank 1
Patrick
Top achievements
Rank 1
Stephen
Top achievements
Rank 1
George
Telerik team
Share this question
or