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.
- tristaanogre9 years agoEsteemed Contributor
You might be able to shorten it to
Aliases.TestAppBlah.blahForm.blah1.blah2.listView1
.wItem[0] depending upon whether or not it is recognized by the object mapping (it should, based upon the help). 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.htmlWith 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.