zoukankan      html  css  js  c++  java
  • Get column value of Flex Datagrid by QTP

     

    ' get the number of rows in the table
    rowCount=Browser("Browser").FlexApplication("App").FlexApplication("Fl exClient").FlexPanel("FlexPanel").FlexCanvas("App Home").FlexPanel("Search Results").FlexDataGrid("searchResults").GetItemsCount

     

    userFound = FALSE

    For myRow = 1 to rowCount
            'select the row
            Browser("Browser").FlexApplication("App").FlexApplication("FlexClient ").FlexPanel("FlexPanel").FlexCanvas("AppHome").FlexPanel("Search Results").FlexDataGrid("searchResults").SelectIndex(myRow -1) ' indexes start at 0
            'get the data contents of the row (the columns are pipe separated)           
            rowData = Browser("Browser").FlexApplication("App").FlexApplication("FlexClient ").FlexPanel("FlexPanel").FlexCanvas("App Home").FlexPanel("Search Results").FlexDataGrid("searchResults").GetROProperty("selecteditem")
            'report the row data
            Reporter.ReportEvent micDone,"Search Results Row " &myRow,rowData
            'split the row data into an array: one element per column
            aRowData=split(rowData,"|")
           
            ' see if the UserName column matches what we want to select
            If myUser <> "" Then
                    ' the strings must match exactly
                    If trim(aRowData(0)) = myUser Then
                        userFound = TRUE

                        exit For
                    End If
            End If
    Next

  • 相关阅读:
    Codeforces Round #605 (Div. 3)E
    Codeforces Round #628 (Div. 2)
    Codeforces Round #627 (Div. 3)
    AC自动机,知识点+hdu模板题
    Tire树,hdu2846,hdu4825
    Educational Codeforces Round 83 (Rated for Div. 2)
    分层最短路
    初入mysql的学习
    赛后总结
    Codeforces Round #625 (Div. 2, based on Technocup 2020 Final Round) D
  • 原文地址:https://www.cnblogs.com/ellie-test/p/3288728.html
Copyright © 2011-2022 走看看