6 Replies Latest reply on Jun 18, 2010 6:42 AM by vondalyn

    QTP Automation

    sensmca

      Dear All,

      I am using QTP 10.0 + Flex Builder 3.02 + QTP Flex Plug-in.

       

      QTP is able to identify all the object and its working fine. Still the Object's inside the Data Gris are identified as Labels I am not able to use the options like GetCelldata, Rowcount, ColumnCount etc. since all the grid elements are identified as labels i am not able to do the click and modify operations in rows and coulmn values.

      Do anyone face this issues please help me to resolve the issue.

       

      Thanks

      Senthil

        • 1. Re: QTP Automation
          vondalyn

          You've probably already resolved this issue, but it is possible to get row count by using the QTP GetItemsCount function.  If you need to look for the value in an individual cell, you can grab each row's data and send it into an array using "split" and then check for.  Here's an example:

           

          ' get the number of rows in the table
          rowCount=Browser("Browser").FlexApplication("App").FlexApplication("FlexClient").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("FlexPa nel").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("FlexPa nel").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

          • 2. Re: QTP Automation
            anjalibaokar

            Hi

             

               I cannot use SelectIndex as Datagrid in my app;lication does not allow me to select a row. So in this scenario how do I get the values of a specific row ?

             

            Thanks

            Anjali

            • 3. Re: QTP Automation
              sensmca Level 1

              Dear All,

              I am using QTP 10.0 + Flex Builder 3.02 + QTP Flex Plug-in.

              I need to edit the properties in “Edit Box”, “Dropdown Box” in a Flex Grid Using QTP.

              Please share the reusable codes to select the row/column values in a Data Grid using QTP

              Thanks

              Senthil

               

              • 4. Re: QTP Automation
                vondalyn Level 1

                I guess I got lucky in that I could use SelectIndex and my application allows me to select rows.

                 

                Does QTP recognize the objects that are inside the data grid using the object repository so that you can learn them that way?  If you can add them to the object repository, then you can probably change some of the properties so that they'll be recognized more consistently.

                • 5. Re: QTP Automation
                  ChikkiChintu

                  Hi Senthil ,

                   

                  I am struck with flex plugin for QTP 10.0. Can u tell me the procedure how to get the plugin..?

                   

                  Thanks

                  ChikkiChintu

                  • 6. Re: QTP Automation
                    vondalyn Level 1

                    For QTP 10.0, you need the Flex Builder 3.02 (or greater) flex plugin.  You should be able to find it as a download on Adobe's website, but if you can't then it's available as part of the file package for Flex Builder v3.02, so you can either download an evaluation copy of Flex Builder and grab the files from the install location.  There is more info in adobe's live docs: http://livedocs.adobe.com/flex/3/html/help.html?content=functest_components2_04.html

                     

                    Hi ,

                     

                    I am struck with flex plugin for QTP 10.0. Can u tell me the procedure how to get the plugin..?

                     

                    Thanks

                    ChikkiChintu