【问题标题】:Unable to Identify DevExpress GridControl using Ranorex test automation tool through C# code无法通过 C# 代码使用 Ranorex 测试自动化工具识别 DevExpress GridControl
【发布时间】: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


【解决方案1】:

使用 Ranorex Spy 跟踪 UI 元素并将其拖放到 Rx Studio 中的用户代码文件中。这样做,您将了解如何使用 Ranorex 访问此特定元素。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-10
    • 2018-11-04
    • 1970-01-01
    • 2012-10-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多