开发者

Identification of WPF DevExpress Grid cell using Automation Libraries

My team is working on automating the UI testing of a WPF application that uses DevExpress WPF Grid (DxGrid). We use Microsoft's UI Automation Library (System.Windows.Automation) for identification and performing actions on controls. AutomationElement class and AutomationPatterns class is mainly used for this purpose. The UI Grid implementation is based on the typical MVVM model where the View Model contains business entities which bind to dropdown columns; string values which bind to Text columns and DateTime values which bind to DateTime columns. The UI Automation Library is able to read actual displayed values of string and DateTime colu开发者_运维问答mns but not for dropdown columns where the underlying binding type is a complex object. The actual values displayed for these columns are shown using the DisplayMemberPath property. The supported pattern for the Grid cell values is the ValuePattern/SelectionItemPattern and we are using it. The limitation with this pattern is that we can only fetch string values and not concrete object. We want to read the actual displayed value in the cell and do assertion checks.

Please provide your suggestion for this. Thanks, Hitesh


This seems to have the similar problem statement:
How can I get a control's DataContext from an external application using UI Automation (and/or White)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜