Forum Discussion

prakash_vasudev's avatar
prakash_vasudev
Contributor
13 years ago

Unable to read updated value from XTPReport control

In our application we have implemented XTPReport to be grid and we work on this control using MSAA. Initially when this grid is loaded we have certain set of values loaded in each cell and we are able to read text from the cell. As a result of some action in our application certain cell values change at runtime in few of cells and now if we try to read the text from the same cell as we did earlier it does not return us the new value which is visible in the cell rather it returns previous value which is now no more visible in that cell.


For ex, assume we have 3 columns, each named Column1, Column2 and Column3. And all the 3 columns are loaded with some values. If I click on a cell which is under column1 then it would change the value of cell under column2 of same row at runtime. So if in Column2 earlier I had value as “Not Started” and later as “In Progress” Test complete is returning us “Not Started” even after the visible value of the cell has changed. But if we close open TestComplete and try to read the same cell, then it returns latest value which is correct one.


Does anyone know why are we not able to read the latest visible value from the cell, which has changed at runtime, unless we close open TestComplete?


We are using TestComplete Version 8.20.538.7

4 Replies

  • Hi Prakash,



    Please try to call the Refresh method of the needed cell's parent object before reading the value of the cell. Does this help?



    Furthermore, the latest available TestComplete version is 8.60. Please try to upgrade your TestComplete to this version (select Help | Check for Updates from the main menu).



    BTW, if you are interested in implementing special support for the XTPReport control (or other Codejock controls) in TestComplete, you can vote for this control on the following web page: http://smartbear.com/products/qa-tools/automated-testing/survey/.
  • Refreshing the object is not helping. Basically in TestComplete we are seeing 2 different cell objects for the same cell. One with old value and one for new value. I believe when the cell value is changed either the old object needs to be updated to have new values or it needs to be disposed. I believe this is not happening which is resulting in having 2 different cell objects for the same cell. This is causing us problem in reading latest values.
  • Hi Prakash,



    Could you please give us a snapshot created for your XTPReport object and all its child objects after you have modified some cell values? Such a snapshot will let us better investigate your issue. To create the snapshot of your grid, please follow the steps below:



    1. Run your tested application and modify some cells in its XTPReport grid.



    2. Select your XTPReport object in the Objects tree of TestComplete's Object Browser panel. To quickly find the needed object, you can:



       a. click the Display Object Spy button on the Tools toolbar to invoke the Object Spy window;



       b. drag the target glyph from this window to the grid in your application, wait until a red frame appears around your XTPReport control and then release the mouse button. Then, the Object Spy window displays the properties and methods of the selected grid;



       c. right-click somewhere in the list of properties and select Highlight in Object Tree from the context menu or click the appropriate button in the top right corner of the window. After that, TestComplete selects the appropriate object in the Objects tree of the Object Browser;



       d. close the Object Spy window.



    3. Click the Save Object Snapshot button on the Save/Load Snapshots toolbar. If this toolbar is hidden, right-click somewhere within TestComplete’s toolbar area and select Save/Load Snapshots from the context menu to make the toolbar visible.



    4. In the ensuing Save Object Snapshot dialog, specify the name of the snapshot file to be created. Select the Properties and Save recursively check boxes and the All properties option. Click OK.



    5. Attach the generated *.tcSnapshot file to your post in this thread. If you do not want to upload the file to the forum, you can send it to our Support Team via the Contact Support form on our web site (http://smartbear.com/support/message/?prod=TestComplete). In this case, please refer to this forum thread in your message before sending it to the Support Team.



    Thanks in advance.
  • Thanks for your reply.



    I have sent the snapshot file to Support team and I have mentioned this discussion link.



    Prakash