如何使用Testcomplete获取VB6中Apexgrid的行内容?

时间:2016-07-04 15:16:44

标签: vb6 testcomplete

我们正在使用 TestComplete 来自动化用 VB6 编写的桌面应用程序。

我们坚持用WndClass TG60.ApexGirdOleDB32.20 获取Apex网格的行内容。

some information in this link 但这还不够。我想根据其内容而不是索引号来选择行。

请有人帮忙吗?

1 个答案:

答案 0 :(得分:0)

有一些本机VB对象属性可用于获取所选列和行的单元格文本。

sub ClicktheRowUsingText(rowText, rowIndex)
    Dim textfromCell, rowIndex, rowCount, i
    rowCount = tgridNew.ApproxCount
    for i=1 to rowCount-1
        textfromCell = tgridNew.Columns.Item(0).CellText(rowIndex)
            if textFromCell = rowText Then
                'Call here the methods given in the above links
                Exit for
            End if
    Next
End Sub
相关问题