issue in getting row count and column count and clicking on cell of data grid
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
issue in getting row count and column count and clicking on cell of data grid
We have a Rogue wave Stingray C++ data Grid control in a desktop application. We want to click on the first cell of the grid. But we are not able to do the action. Columns and rows are not identified as individual. But grid is identified as a whole. I have marked the area on which we want to click. If you see in object spy snapshot there is error for wColumnCount and wRowCount as below.
Error: Error
An error occurred.
Possible reasons:
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete.
Technical information:
97 0x80020006 (Unknown name.) GetRowCount
Why this error is comming and due to this error are we not able to do any action on first cell?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In most cases, child objects of grid controls are internal, so TestComplete does not recognize them as individual objects and does not show them in the Object Browser. To access these objects, you need to use native methods/properties of their parent objects. What particular methods/properties you need to use, you can find out in your control's documentation. However, firstly, you need to compile your application with the debug information. This will allow TestComplete to see debug properties that you may need to use.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I experienced this problem with a Delphi program which wasn't compiled with debug info.
With the debug info, I have access to the elemets behind the grid such as Dataset and I'm able to browse in its records.
If you need to keep a version of your software without debug info, see if you could build at the same time a debug-info free version and the debug info file besides it.
So when you will want to run Test Complete, you'll just have to put it in the same folder than your soft executable.
Mehdi
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have added grid::CGridImpl class under Rogue wave Stingray C++ in object mapping. I am able to access clickCell and other methods like clickRowIndiactor, clickColumneader etc.. method. (in intellecense it shows all these methods)
I tried directly using clickCell method on grid but its giving sntax error for this method.
set wGrid = Aliases.SisXV.wndsisXVFrame.BCGPControlBare87c000081000310.BCGPTabWnde87c000081000310.BCGPControlBare87c000081000310.AfxWnd100u.Afx.BCGPTabWnde87c000081000310.page32770.GridContainer.GXWND
wGrid.ClickCell(0, "Object ID")
Eventhough I give column name or column index its giving syntax error.
Is it not possible to directly use this clickCell method on grid? But on smart bear site and forums I have seem such line of code.
I will try to compile the application with debug info as you suggested. I am getting error for colum count and row count. I only want to click on the first cell. Is there any other workaround for the issue?
Also i want to know that how to identify that application is enabled with debug info or not?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
See my answers below:
>> Is it not possible to directly use this clickCell method on grid?
Firstly, please check if your grid provides the ClickCell method. If it does, you should see the method in the Methods tab in TestComplete’s Object Browser. Once, you select the method in the list, you will see the required syntax.
>>Also i want to know that how to identify that application is enabled with debug info or not?
In the Object Browser, you should see the Debug Agent or RTTI sections with the list of properties and methods.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
TanyaGorbunova , Thanks for your reply.
I have checked the object browser. For data Grid object there are only 4 sections Standard, MFC, Actions, Open App Objects.
In object browser there is no Debug Agent or RTTI sections with the list of properties and methods.So does this mean that application is not compiled with debug info.?
When I object spy the grid, it shows clickcell method. Its syntax is given as clickCell(Row as integer, column as object, shift as object) I have confusion about second parameter. In testcomplete documentation they have mentioned that for this second parameter give column name or index.But if we give column name or index it gives syntax error. So what should we pass for this parameter
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tanya,
Could you please provide any input on my above comment?
Thanks and Regards,
Swati Nadage
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If the application was properly prepared, you should see all available properties and methods listed in the "Rogue Wave Stingray Objective Grid (C++) Support" ( http://smartbear.com/viewarticle/55651/ ) help topic. Can you post here an example of your ClickCell call?
The following should work:
//JScript var grid = //… obtain the grid object grid.ClickCell(0,0); grid.ClickCell(1,"ColumnName");
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I trid clickCell method same as you have given. But its giving syntax error for second parameterie column object. am using TestComplete 9.20. For clickCell method second paramter requires column object. But I am not understanding as a column object what should I pass. TestComplete identifying grid as whole, not indivisual cells and rows.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Hmmm. What Stingray grid version is used in your application? TestComplete 9 supports only ver. 10.4.
Tanya Yatskovskaya
SmartBear Community and Education Manager
