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

Finding items in grids and trees etc

1 Answer 23 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Bill asked on 02 Aug 2012, 06:21 PM
Sorry for the cross-posting. I noticed this one is much more popuar then the express forum

I was unsure if I should post this in the testing forum or the RadGridView forum.

It is regarding Automated testing but more of a general question since our testers have decided to go with the IBM Rational Functional Tester (RFT) 8.2.2.  since they test various types of apps- WPF, Web etc.

Ours is a WPF app using Telerik WPF controls and Prism.
 Our testers have told us that they cannot select specific rows in a grid because the RadGrid rows do not have any unique attributes like UID or name.
I verified that using Snoop and the IBM rational tool built into the testing tool which gives similar results to snoop.
I use the RadGrid as an example but the same problem applies to other controls like RadTree for example.
Since the grid rows are created at runtime, the GridRows do not contain the unique attributes to help the automated testing tool locate a row with specif text.

So the question is who's problem is this?
What I mean by that is do we fix it on the code side or expect the testers to figure out a way to do it on their side?
I think we could fix it on the code side but before we do, (and possibly slow down the grid loading a bit) we want to ensure that that is the correct approach or do we leave it in the hands of the testers to worry about.

On the code side I assume (unless theres a better way) to wait for the grid to finish loading and then run a method that iterates the rows/columns and adds a Name (or UID) attribute to each row with text from column X. So for example Row 1 would end up with Name="Bob Smith" taken from the Full Name column in the grid. Then the automated testing tool could find the row based on the name attribute.

I don't know the IBM automated tool capabilities but I would think that it (and all testing tools) should be able to do a similar thing to locate a row from the tool itself.



This DOES work:



Private Sub UserSearch_DataGrid_RowLoaded(sender As Object, e As Telerik.Windows.Controls.GridView.RowLoadedEventArgs) Handles UserSearch_DataGrid.RowLoaded




' for automation testing add the UID prop based on the first column




If TypeOf (e.Row) Is GridViewRow Then e.Row.Uid = e.Row.Cells(0).Content.text




End Sub


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 07 Aug 2012, 09:18 PM
Hello Bill,

Since this forum is dedicated to Test Studio the most we, the Test Studio support team, can do for you is talk about and demonstrate how Test Studio can be used to automate the RadGridView. We can't help you with how to use IBM Rational Functional Tester.

Kind regards,
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question