我正在使用 TestStack.White 从用 VB6 编写的旧应用程序中读取列表。我能够找到对列表的引用,但 TestStack.White 没有看到列表中的值。
当我使用 Spy++ 或 Visual UI 自动化验证 ID 为 15、14、16、12、11、10、8 等的窗格时,列会突出显示,而不是实际的文本框。你可以看到这个应用程序截图。
有人对我如何从列表中获取值有任何建议吗?
提前致谢。
TestStack.White.UIItems.Panel grid = searchform.Get<TestStack.White.UIItems.Panel>( TestStack.White.UIItems.Finders.SearchCriteria.ByAutomationId( "7" ) );
foreach ( TestStack.White.UIItems.GroupBox item in grid.Items )
{
foreach ( var itemGroupBox in item.Items ) // item.Items is always empty
{
var tmp = itemGroupBox;
}
}
这是应用程序的屏幕截图。
Spy++截图
Visual UI 自动化验证的屏幕截图