【发布时间】:2016-03-24 12:13:36
【问题描述】:
在 Visual Studio 2013 中,我正在使用 Ranorex 工具参考为 WPF 应用程序编写带有 C# 代码的测试自动化方法:我无法识别位于 WPF 应用程序中的 DevExpress GridControl 并且无法检索其属性(网格数据(行和列))。有人可以帮忙吗?
var devExgrid = form.FindSingle<RanorexDataGrid>(".//element[@automationid='dg_UserOrders']");
错误:
The type 'Ranorex.Controls.RanorexDataGrid' cannot be used as type parameter 'T' in the generic type or method 'Ranorex.Adapter.FindSingle<T>(Ranorex.Core.RxPath)'. There is no implicit reference conversion from 'Ranorex.Controls.RanorexDataGrid' to 'Ranorex.Adapter'.
【问题讨论】:
-
我试图了解什么是 RanorexDataGrid,但在文档中找不到有关此类型的任何信息。我建议在网格项目上使用 Ranorex 间谍,将其添加到存储库并查看 Ranorex 用来表示它的适配器类型(在生成的代码中)。
标签: c# wpf devexpress automated-tests ranorex