Forum Discussion
It could also be that the items aren't rendering as text. For example, if the item list contains a list of images or objects, your wItemList will not show the objects but just the text separators. This does not mean the objects don't exist, just that they don't render out as text.
So, if you call wItem(0), what does this return? That SHOULD be the first item in your list.
What does the list look like on screen? Can you see the individual objects themselves? What do they render as in your AUT?
Hi,
when I use wItem(0) or any values in wItem, I am getting the null value as result. Object exist in screen but I couldn't get it in code.
The list UI render by Java Swing List. I can able to select an individual row and scroll down/ up.
- tristaanogre8 years agoEsteemed Contributor
Can you show us what this thing looks like on screen?
Again... note that wItemList has a WHOLE bunch of list separators but no actual data in between.... this means that the list is there... but the individual items are not text objects....so.... what are they?
It might be that you need to go with some other methods other than wItemList or wItem. See if there is an "Items" property on your component or something else that has the list of objects.- tcsalex8 years agoOccasional Contributor
Hi,
I attached the list image here.
I don't find any properties with the list and or something. One more thing, I could see child count 1 in my properties list but there is no child object for the list in the object browser.
I think the list contains images instead of text.
- tristaanogre8 years agoEsteemed Contributor
That looks more like a grid than a list. So... is it a SwingList of rows? Or is each row a list item? What gives here?
See, the component class you're trying to reference it as is usually a list of items, each one a string of text to be referenced. What you have here looks a LOT more like a table or grid. I'm guessing that each row is an item in the list which means that they aren't necessarily object that you can retrieve in this way.
Is this something that is natively recognized as a SwingList by TestComplete or did you do some modifications of your Object Mapping to map this component to the SwingList?
Related Content
Recent Discussions
- 5 hours agoSvetaG