Forum Discussion

automTest's avatar
automTest
Occasional Contributor
6 years ago
Solved

Scraping data from a desktop application

Hey community, 

 

I'm currently looking for a way on how to extract data from a table within a desktop application which doesn't really play nice with TestComplete (for now!). I'm able to extract the number of columns and rows. Then again, when I try to access each element individually I get a value of null. The object I'm handling is identified as a sorted table which pretty much englobes the entire table and not each cell individually. 

 

Does anyone happen to know any solution on how to extract the text from each cell individually?

 

Thanks!

  • Poida's avatar
    Poida
    6 years ago

    Try having a look in the Object Browser while you have the executable running.   You should be able to browse it's object model and have a look at whether the values you're looking for are available to TC.  That's where I'd start.   Once you find it you can right click and make an alias for it then address it in code as Aliases.Blah.Blah.blah.StuffImLookingFor

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Assuming you reference the table as an object like Aliases.MyApp.MyTable what do you get when you do

     

    Log.Message(Aliases.MyApp.MyTable.Cell(5,5)) assuming 5,5 is a valid co-ordinate?

    • automTest's avatar
      automTest
      Occasional Contributor

      I can't reference the table by Aliases.MyApp.MyTable.Cell(x,y). But, I can use "cellEditor" and "cellSelectorEnabled" at the most by cell-wise indicators.

      • Poida's avatar
        Poida
        Occasional Contributor

        Try having a look in the Object Browser while you have the executable running.   You should be able to browse it's object model and have a look at whether the values you're looking for are available to TC.  That's where I'd start.   Once you find it you can right click and make an alias for it then address it in code as Aliases.Blah.Blah.blah.StuffImLookingFor