cancel
Showing results for 
Search instead for 
Did you mean: 

wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

tcsalex
Occasional Contributor

wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

Hi,

 

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 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ? 

 

 

10 REPLIES 10
shankar_r
Community Hero

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

Hi,

 

Actually, (|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||) is not an value.

 

If the list has value then it will be displayed like,

 

item1|item2|item3|..............|itemn

 

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
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

tcsalex
Occasional Contributor

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

Thanks for your reply. 

 

In that case,  System doesn't get any value between separator so I can't get the value. 

shankar_r
Community Hero

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

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(|||||||||||....)


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

tristaanogre
Community Hero

Re: 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?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
tcsalex
Occasional Contributor

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

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. 

tristaanogre
Community Hero

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
tcsalex
Occasional Contributor

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

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. 

tristaanogre
Community Hero

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

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?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
tcsalex
Occasional Contributor

Re: wItemList(|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||)

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

 

New Here?
Join us and watch the welcome video:
Announcements