【发布时间】:2015-11-10 05:18:14
【问题描述】:
我正在尝试使用 UIAutomation 获取组合框的选定值。到目前为止我的代码如下:
var cbx = tree.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.NameProperty, "desktopCbx"));
var value = cbx.Current.Name;
它没有给我正确的价值。我怎样才能找到合适的?
【问题讨论】:
-
UISpy 是否显示 cbx.Current.Name 中的文本?
标签: c# windows winforms ui-automation