Ask a Question

Infragistics RecordListControl not recognized as table or How to access rows and columns?

Grit
New Contributor

Infragistics RecordListControl not recognized as table or How to access rows and columns?

Hi,

 

first: I am pretty new to TestComplete, so I apologize in case I just did not look in the right place for the answer. I have spent quite some time looking without being able to solve my issue.

 

We have in our application several tables represented by "Infragistics.Windows.DataPresenter.RecordListControl"s. The child items in that control are of class "Infragistics.Windows.DataPresenter.Internal.RecordListItemContainer".

 

The RecordListControl is one of the derived classes of the XamDataGrid, it is enabled as such in the ObjectMapping. My problem is that I cannot seem to use any of the methods of the XamDataGrid (https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/infragistics... ).

I need some way to find the correct row using the value of a specific column and then mark/unmark this row using the RecordSelector.

 

Here is what this table looks like in the Object Browser:

 

Grit_0-1660654112775.png

 

Any help would be very much appreciated.

 

Thanks,

Grit

 

 

2 REPLIES 2
8Kit
Frequent Contributor

Are you using Name Mapping? Based on your object tree, one guess is that you might be referencing the child item within the control incorrectly. Could you provide the lines of code that are failing? Or how you have referenced these objects in your scripts?

 

Have you tried using something like findAllChildren() to search through the table for all objects in class "RecordListItemContainer"?

 

To help troubleshoot, you can also run a Record Script test against your application. Attempt to interact (click or edit) the parent/child objects in your table as TestComplete is recording your actions - then, when you stop the test, TestComplete will spit out a script showing you how it is finding these objects:

8Kit_0-1660657710579.png

 

The Object Browser can be cumbersome to reference since it's displaying the DOM breakdown of every open application on your system, so I would recommend using your Object Spy tool (icon with the blue crosshairs) to see the exact properties and values of the parent/child objects so you know how to uniquely reference and find them in your script. 

 

Grit
New Contributor

Hi,

 

yes I am using the Name-Mapping. And I am also using only scripts so far.

 

I have found a workaround now, which is a bit overly complicated, but seems to work so far. Basically I am mapping the cell with the correct value at a specified column index via project variable, then use this as required child for the row (the RecordListItemContainer), so that I can identify the correct RecordSelector (a child of the container).

 

The script code looks like this (JavaScript):

 

recordListControl.RecordListItemContainer.RefreshMappingInfo();
recordListControl.RecordListItemContainer.CellvaluepresenterGeneric.RefreshMappingInfo();
recordListControl.RecordListItemContainer.RecordSelector.RefreshMappingInfo();
recordListControl.RecordListItemContainer.RecordSelector.Click();

 

 

Name Mapping looks like this:

 

Grit_0-1660809592739.png

 

When I do script recording, TC never record the container, always only the CellValuePresenter.

 

Like I said, this works for now, but according to the documentation, things like this should also work, but don't. And I do not know what I am doing wrong:

 

var rowIndex = recordListControl.FindRow(3, "1000");

recordListControl.ClickCell(rowIndex , 1);

cancel
Showing results for 
Search instead for 
Did you mean: