我有一个 Windows 应用程序,其中几个按钮在 UISPY 中显示为 Pane 。
自动化元素
一般辅助功能
AccessKey: ""
AcceleratorKey: ""
IsKeyboardFocusable: "True"
LabeledBy: "(null)"
HelpText: ""
状态
IsEnabled: "True"
HasKeyboardFocus: "False"
身份识别
ClassName: "WindowsForms10.Window.8.app.0.33c0d9d"
ControlType: "ControlType.Pane"
Culture: "(null)"
AutomationId: "2624504"
LocalizedControlType: "pane"
Name: "SAVE"
ProcessId: "6892 (OATDT.ATA.SP.Home)"
RuntimeId: "42 2624504"
IsPassword: "False"
IsControlElement: "True"
IsContentElement: "True"
可见性
BoundingRectangle: "(-31471, -31598, 104, 23)"
ClickablePoint: "(null)"
IsOffscreen: "True"
控制模式
如何获取该 Pane 并单击它?有谁可以帮忙吗
最佳答案
我想你可以尝试这样的事情
var pane = window.Get(SearchCriteria.ByAutomationId("2624504"));
pane.Click();
这对我来说同样有效
关于white-framework - 如何在 TestStackwhite 中获取自定义UIItem,其中控件类型为 ControlType.Pane,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16909921/