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.
Comments???
PS:
This DOES work:
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.
Comments???
PS:
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