【发布时间】:2015-08-23 08:20:38
【问题描述】:
当我尝试获取工具条元素时
ToolStrip toolStrip = StartApplication.Window.Get<ToolStrip>(SearchCriteria.ByText("Toolbar"));`
出现此错误:
错误:无法获取 ControlType=tool bar,Name=Toolbar
工具栏属性是:
- 名称:“工具栏”
- ControlType:UIA_ToolBarControlTypeId (0xC365)
- LocalizedControlType:“工具栏”
- IsEnabled:真
- IsOffscreen: 假
- IsKeyboardFocusable: true
- HasKeyboardFocus: true
- LegacyIAccessible.Name:“工具栏”
- LegacyIAccessible.Role:工具栏
- (0x16) LegacyIAccessible.State:focusable,focusable (0x100004)
【问题讨论】:
-
看来问题出在错误的控制类型上,我遇到了“窗格”控制类型的问题,它被检查为“窗格”,但我应该使用“GroupBox”类型来与 teststack 一起使用。
-
这是一个 Infragistics.Win.UltraWinToolbars.UltraToolbar 我怎样才能得到它?
标签: automated-tests white-framework