【问题标题】:Finding a VB6 control using TestStack.White使用 TestStack.White 查找 VB6 控件
【发布时间】:2015-04-29 15:31:41
【问题描述】:

我正在使用 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 自动化验证的屏幕截图

【问题讨论】:

    标签: vb6 white-framework microsoft-ui-automation


    【解决方案1】:

    尝试使用类似item.AutomationElement.GetCurrentPropertyValue(ValuePattern.ValueProperty)的东西

    您是否可以从“检查”应用程序中发送带有网格单元属性的屏幕截图?

    【讨论】:

    • 我同意@Vlad Kostyukevich 最好从位于“C:\Program Files (x86)\Windows Kits\8.1\bin\x64\Inspect. exe"
    猜你喜欢
    • 1970-01-01
    • 2014-08-30
    • 2014-12-26
    • 2016-07-17
    • 2016-03-14
    • 2017-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多