Ask a Question

Not able to get values from list view

pankajjain2050
Contributor

Not able to get values from list view

As attached, I have an object of type listview. I am able to navigate and click the cells of the list using Listview.ClickItem(x,y) but I am not able to get their values (text). I have tried below functions with no success (it returns blank)

 

Listview.witem(1)

Listview.wItem(i).GetText

Listview.wSelectedItems

10 REPLIES 10
Marsha_R
Community Hero

What does your name mapping show for the properties of those items?  Showing us a screenshot of the extended properties would help.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

I have attached the screenshot of all the properties (in 2 parts) I can see for that mapping. I guess there is not extended properties for that field.

I see that the Item Count has 4 items.  Can you map the items separately?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

How do I map the items seperately? object spy treats them as one object.

Also, the number of items would vary for each test iteration.

Have you worked through these instructions?

 

https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/standard/list-view/index....


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

"Failed to get the text of the list view item." is the error I get on trying wSelected or wItem(index).

Do I need to add some plugin that will read the value from list?

I don't know what you have set up and what you don't so it's hard to tell.  The instructions for setting up list view access are here:

 

https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/standard/list-view/index....


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

I have added the classname in object mapping of my project. This classname I got from objects properties.

Then I deleted and again added the mapping of the object using "add object" from testcomplete.

Then when i tried to get the text, it gave me  "failed to get the text of the list view item"

Well now I've asked twice if you've followed the actual instructions or not and still no answer.  

 

My next suggestions are these:

 

1) Work through the instructions at the link I posted in the last two replies.  TestComplete documentation is very good and they make it public so you can have a good reference.

2) If you still have a problem after working through the instructions, contact Support directly.  Here's the link:

https://support.smartbear.com/message/?prod=TestComplete

 

Good luck!

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: