dimanche 22 novembre 2015

How to done the LeanFt testing for MSDatagrid in WPF

I have created leanft project and created sample with msdatagrid but it throws table was not found exception and also i am not sure the way of testing of ms datagrid in leanft. could you anyone help on this to fix this ?

Datagrid sample:

    <Window x:Class="WpfApplication12.MainWindow"
            xmlns="http://ift.tt/o66D3f"
            xmlns:x="http://ift.tt/mPTqtT"
            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);

            }

Aucun commentaire:

Enregistrer un commentaire