Forum Discussion

hiregoudar_maha's avatar
hiregoudar_maha
Occasional Contributor
10 years ago

How to select the values in CListControlGrid

Hi,



I am having a problem in selecting values in CListControlGrid, my application is built using Delphi technologies initially I was not able to identify the grid in my application for that I added the CListControlGrid class to Tools->Current Project properties->Text Recognition now I am able to identify each cell value as TextObjects  but If I want to select the value in 1st row 2 column value i,e cell(1,2) I am not able to select the value because I am not getting any method which will perform this operation.



Please help me in resolving this issue.......





Thanks,

Mahantesh

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)


    Hi Mahantesh,


     


    We recommend using Text Recognition only if other approaches don't help you improve the object recognition. So, try using another way...


     


    As you are using a Delphi application, it's highly recommended that the app is complied with debug information. Please check this. Refer to the "Debug Info Agent" article and those related to learn how to set up the app's project before compiling.


     


    After making sure that the app is compiled correctly, let's try improving the object recognition. The control you use (CListControlGrid ) isn't officially supported by TestComplete. However, you can make the tool treat the control as a supported one by using the "Object Mapping" feature.


     


    If this doesn't help, you can use Delphi's native methods and properties to access the target cell of the grid. To learn the exact method you need to use, refer to the control's documentation.


     




  • Ravik's avatar
    Ravik
    Super Contributor
    Hi Mahantesh ,



    Use Item(row, Column).Value method for retrieve value from grid.



    like -



    text = TestObject.Item(1, 2).value



    it may be helpful for you.
  • hiregoudar_maha's avatar
    hiregoudar_maha
    Occasional Contributor
    Hi Ravi,



    Thank you for your reply, but I am not able to see the Item method for my CListControlGrid object. But I am getting row count and column count from this object,can you help me is there any other method which can be used to select value in grid.



    Thanks,

    Mahantesh