I have an application that uses a DataGrid to display a list of contacts. 8 columns, 4 representing customer information (rows), and the remaining 4 columns are CheckBoxes (for testing purposes, I set all to true).
Using TestStack.White I can get a DataGrid control through this (although the element is a table):
var distributionGrid = window.Get<Table>(SearchCriteria.ByAutomationId("DistributionGrid"));
But I have not yet been able to add the lines. I tried:
distributionGrid.Rows[0].Cells[0].SetValue(firstName);
But this did not work, although it compiles and runs. When I go back and use the debugger, the value of the cell [0,0] is still zero.
I can not work with this. I also tried using Rows.Add (), but I can never get the correct syntax that seems.
source share