Forum Discussion
I don't think you can examine elements of a Python list object in Debug view. I have never been able to do that, somewhat inconvenient. Fortunately Object Spy is very cool.
Looks like a ListView object you've got there. To see what is in there I would suggest first going to "Advanced View" in object spy. Point at your listview object like you have already done in your screen shot. Go to "Items" under .NET in Advanced View Object Spy. Go click on the "...", type in an item index (like 0) and start drilling down into the item hierarchy. Once you can drill down into the listview to the items in Object Spy, copy the full path at the top and start playing with that in script.
Eventually you should be able access the items from script like this...
Aliases.TestAppBlah.blahForm.blah1.blah2.listView1.Items.Item[0]
^You'll probably want to find something less brittle than a numerical index but that should get you started.
Hope that helps.
You might be able to shorten it to
Aliases.TestAppBlah.blahForm.blah1.blah2.listView1
The specifics on that kind of list view control can be found at
https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/desktop/win32/list-view/index.html
With pointers and tips at
https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/standard/list-view/index.html
- Divya-tfw9 years agoNew Contributor
Hi ,
I tried with above solution but its not working.
Can anyone tel exact code snippet to fetch list element properties and display same
- NisHera9 years agoValued Contributor
Seems you are new to Automated testing...
Automated testing is combination of Testing, Programming and bit of project management.
Hence there is a leaning curve what ever tools you uses.
as per tristaanogre exact situation only know by you others can give only hints. So keep tying with various combinations.
Even if takes time to figure out, you will progress as an automated tester.
I think what you are trying to do is possible.
- tristaanogre9 years agoEsteemed Contributor
If you still need someone here to help you, we'd be happy to... but we need a lot more information.
For example, you say you tried something... what did you try? What code/keyword test are you using? Post script code and/or screenshots of the keyword test.
For the component in question, if we could have a full view of all properties available that show up in the object browser. This might take multiple screenshots to get the information.However, based upon what we see already, this should be covered by the articles I posted which describes the properties and methods of ListView components and gives a few examples as to how to use them. If you adapt the examples for your application and it's still not working, please post the code you attempted and we'll try to help.
As always, there may be more than one way to do a particular task and a lot of it is dependant upon how the component is implemented by your developers. One thing I've found that is always helpful is having open communication with the developers. They know the code and the components, they should be able to help you understand what properties may be able to be used.
- tristaanogre9 years agoEsteemed Contributor
We can't give you the exact snippet because we don't know what your application component looks like exactly. We've given you a template to use that you need to adjust/adapt for your specific situation.