I have created leanft project and created a sample with DataGrid
, but it throws table was not found exception and also I am not sure the way of testing of DataGrid
in leanft. Could you anyone help on this to fix this?
Datagrid sample:
<Window x:Class="WpfApplication12.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="datagrid_window"
Title="MainWindow" Height="350" Width="525">
<Grid>
<DataGrid x:Name="msdatagrid" AutoGenerateColumns="True">
</DataGrid>
</Grid>
</Window>
I have set the itemsource for this datagrid from the code behind.
Leanft Test method:
public void TestMethod1()
{
SDK.Init(new SdkConfiguration());
Reporter.Init(new ReportConfiguration());
Process.Start(@"..\..\..\Debug\WpfApplication12.exe");
IWindow win = Desktop.Describe<IWindow>(new WindowDescription
{
IsChildWindow = false,
IsOwnedWindow = false,
AccessibleName = @"datagrid_window",
});
ITable table = win.Describe<ITable>(new TableDescription
{
Name = @"msdatagrid"
});
table.SelectCell(1, 1);
}