在WPF应用程序中从表格视图中声明表值 [英] Assert table value form a grid view in WPF application

查看:75
本文介绍了在WPF应用程序中从表格视图中声明表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在自动化一个WPF应用程序,在该程序中我需要声明\验证表中存在的值,该表是gridview.

I am automating a WPF application in which i need to assert\verify the value present in the table, the table is a gridview.

谢谢

AL

推荐答案

阿尼·洛克(

根据您的描述,请尝试以下代码:

According to your description, please try the following codes:

备注:

this.UIMap.UIMainWindowWindow.UIItemTable是表格;

this.UIMap.UIMainWindowWindow.UIItemTable is table;

rows [0]表示我们选择了0行;

rows[0] means we select the 0 row;

cells [1]表示我们选择第0行,第二列;

cells[1] means we select No. 0 row, second column;

            UITestControlCollection rows = this.UIMap.UIMainWindowWindow.UIItemTable.Rows;
            WpfCell cell = null;
            var cells = rows[0].GetChildren();
            cells[1].DrawHighlight();
            cell = (WpfCell)cells[1];
            Debug.WriteLine(cell.Value.ToString()+"");

请让我们保持联系.

此致

奥斯卡


这篇关于在WPF应用程序中从表格视图中声明表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆