Forum Discussion

JackSparrow's avatar
JackSparrow
Frequent Contributor
9 years ago

Extracting the data from Grid-table(Windows Application) using Python

Actually I need to get total values of a single column present in the Grid Table .So first i used the below code for getting the count of Child Items and Names of it which are in  the Grid Table.

def grd ():
  Grid = Aliases.teacher_debug.frmMain.dxDockSite.TdxDockPanel.frmListDealNav.TdxDockSite.TdxLayoutDockSite.TdxDockPanel.frameList.grdGridFrame.TcxGridSite
  if Grid.Exists:
     Log.Message(Grid.Name,Grid.FullName)
     for i in range (0,Grid.ChildCount):
       countchi = Grid.Child(i)
       Log.Message(countchi.Name,"",0)

and the OutPut was Window("TcxGridSite", "", 1)

 

Am not able to understand what went wrong please guide me

 

 

  • JackSparrow's avatar
    JackSparrow
    9 years ago

    Hi Colin_McCrae HKosova how are you :)

     

    I got a solution for getting all the list values i.e.

     

    1. First We need click on the list so that drop down of list is visible.
    2. Now Spy the DropDown By **bleep**+CTRL+A
    3. Now Object Spy will show all the Properties.
    4. Go Inside Grid View from there View Details From there to Record.
    5. Now In the Record Give Param as 0 and go inside it .
    6. Check the Display Text Now given the Param as 0
    7. Now you will able to see the First value in the list
    8. So by changing every time the Param of Record and by default keeping the Display Text Value as 0 we will get all the values in the List.

    So the Aliasis Looks like this Aliases.Teachers_debug.TcxComboBoxPopupWindow.TcxExtLookupGrid.TcxGridSite.GridView.ViewData.Records[i].DisplayTexts[0]

     

    Finaly one thing solved :D  but not still the Grid View :P

     

  • JackSparrow's avatar
    JackSparrow
    9 years ago

    Hi Colin_McCrae and HKosova

     

    I was able to read the Grid values ,in the same way which i did in my previous post of how i was able to read all the list values , so finally it solved . Am happy that i was able to solve it myself. :manhappy::smileyvery-happy:

     

    Thanks for your support team

    • JackSparrow's avatar
      JackSparrow
      Frequent Contributor

      Ya TcxGrid is visible but if i try to highlight the TcxGrid the total grid is getting highlighted  ,when i use object spy the total grid is getting captured even if i focus in the middle of the grid.The Application which am trying to automate is developed by Delphi.

       

      Please check the screenshot for the object spy properties

      • JackSparrow's avatar
        JackSparrow
        Frequent Contributor

        Hi all,

         

        According to the above mentioned links , I need to Compiling Delphi 2010 Applications but I got confused with the mentioned steps, that are not present in my Test Complete Version 11.31.2420.7   , can you please let me know the procedure to compile with External Debug Information (TDS Files) for my Delphi Application