Forum Discussion
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:
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.
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:
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);
Related Content
- 13 years ago
- 11 months ago
Recent Discussions
- 23 hours ago