Forum Discussion
roc_muto
12 years agoNew Contributor
In your screenshot I don't see a third row? Does it exist when you get to the line:
Aliases.TestComplete.HwndSource_MainWindow.MainWindow.StackPanel.Grid.DataGridRow2.DataGridCell2.TextBox.SetText("50");
When we work WPF DataGrids we take either 2 approaches.
Aliases.TestComplete.HwndSource_MainWindow.MainWindow.StackPanel.Grid.DataGridRow2.DataGridCell2.TextBox.SetText("50");
When we work WPF DataGrids we take either 2 approaches.
We map just the grid object and work with the cells and rows using the diffent methods provided like ClickCell, FindRow etc. Here are the methods TestComplete provides when working with a standard Microsoft DataGrid http://support.smartbear.com/viewarticle/60989/
The other approach we take would likely involve development to work with you and is a custom solution we did for some grids and likely wouldn't be relevent for you. We map the grid and map one row and all cells within using the AutomationID. Change the mapping to be a variable and then set the variable prior to doing any row or cell specific actions.