我定义了一个WPF扩展器,其自动化ID类似于:
<Expander AutomationProperties.AutomationId="MyExpander">
Ranorex间谍找不到自动化ID,而是将其显示为:
/form[@automationid='MainForm']/container[@automationid='MainGrid']//button[@automationid='HeaderSite']
不确定Ranorex间谍为何无法找到“ MyExpander”自动化ID,因为Ranorex间谍正确显示了扩展器中单选按钮等的其他已定义自动化ID。
我正在使用Ranorex Spy 8.1.2。
答案 0 :(得分:0)
我找到了一个解决方案,虽然效果不佳。
我可以在扩展器中找到单选按钮等的自动化ID,该ID会下降两级,所以像这样上升:
var expander = MyRadioButton.Parent.Parent
,然后在该元素上执行QuickClick(),WPF扩展器将打开。