• 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

  • 相关阅读:
    虚拟机NetworkAdapter三种方式的区别
    skia
    android gralloc是什么意思
    两个工作机会
    Ubuntu apt-get更新源替换及加速方法
    Vuforia和Metaio相继被收购,开发者们还有这些AR引擎可以选
    OpenCV 为啥勾搭上 OpenGL
    感受2万元的黑科技 微软MR头显HoloLens测评
    影创 我们的职位
    java基础-servlet-2:生命周期
  • 原文地址:https://www.cnblogs.com/ellie-test/p/3288728.html
Copyright © 2020-2023  润新知