I am trying to automate the JAVA Swing application. when I try to get the value of Swing list, I couldn't get the value. always I am getting the null value. I attached the object browser screen too. Can anyone help to get value from the Swing list when wItemlist has ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?
Actually, (|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||) is not an value.
If the list has value then it will be displayed like,
What you seeing in your Item List | isseparator (as you see in wListSeparator)
So, if you getting null then that is expected. Hope it clarifies your questions.
Thanks for your reply.
In that case, System doesn't get any value between separator so I can't get the value.
If AUT doesn't have any value then wItemList will display empty.
If AUT doesn't have value for each item then it will get display as wItemList(|||||||||||....)
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?
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.
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.
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.
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?
I didn't do any modification for this object. The class name identified by Test complete is "ListBean$1" and the name of the object is SwingObject("ListBean$1", "", 0).
There are a header row and few rows with items. There is no list under each row. I need to get the value of one of the row.
If each row an item, how can I get it without any property or something