white-framework - 如何在 TestStackwhite 中获取自定义UIItem,其中控件类型为 ControlType.Pane

标签 white-framework

我有一个 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/

相关文章:

white-framework - 使用 UIAutomation .NET 在桌面上查找所有窗口

c# - 使用 TestStack.White 设置 `VirtualizingPanel.IsVirtualizing`

C# TestStack.White - 无法精确定位到我想要的按钮

c# - 我们如何使用 teststack.white 自动化框架检查特定模式窗口是否打开?

wpf - Teststack.White拖放问题

wpf - 如何使用 TestStack.White.UIItems 测试 ItemsControl

testing - 测试自动化 - Win32 应用程序 - 白色/UI 自动化 - 对象识别问题

c# - 如何在 C# 中将 className 传递给将泛型类型作为参数的方法

automated-tests - UI 自动化白色框架 "NonComVisibleBaseClass was detected"异常