Forum Discussion
- rraghvaniChampion Level 3
What properties are exposed, when using Object Spy tool?
- PrathyushaCHOccasional Contributor
Only wItemCount
- rraghvaniChampion Level 3
Just wItemCount and no other properties? Can you take a screenshot of the Object Spy tool for your control
- PrathyushaCHOccasional Contributor
These are the properties of the grid. It has 2 rows and 5 columns.
- rraghvaniChampion Level 3
It's a .Net application, and Object Spy has identified the control as being a ListView. A ListView can have custom views, similar to Explorer when changing the views to either small icons, tiles, list, details etc.
If you refer to https://support.smartbear.com/testcomplete/docs/app-testing/desktop/net/index.html and https://support.smartbear.com/testcomplete/docs/app-testing/desktop/wpf/index.html you will be able to get more properties for your .Net application.
- JDR2500Contributor
Hi,
I have dealt with this issue before with several different grid controls. Two approaches have worked for me.
Approach number one only works if you can manually select individual cells, or groups of cells, using your mouse. It also requires that you are able to move through the cells using arrow keys on the keyboard. Lastly, you must have the ability to copy the cell contents to the clipboard. So the sequence would go something like this if for instance you wanted to verify the value in row 2, column 2 using a script:
- Click in the top left corner of the grid to select cell 1,1, or the column header if it has one, <grid control object>.Click 5, 5
- Send keystrokes to move to the target cell <grid control object>.Keys("[Right][Down]")
- Copy the cell contents to the clipboard using keystrokes <grid control object>.Keys("^c")
- Verify the value with a clipboard checkpoint: Clipboard Checkpoints | TestComplete Documentation (smartbear.com)
Provided the grid responds to keystrokes you can select and verify multiple contiguous cells by using the Shift key in combination with the arrow keys.
If you can't work with the grid control in the manner described above, then approach number two may be your best option. That approach uses the IQ Add-in to recognize the table and provide access to the cells. The downside of that approach is the extra expense of the IQ Add-in and requirement that all your test environments have external internet access.
Here is a link to the help topic for using that method: OCRTable Object | TestComplete Documentation (smartbear.com)
Best regards,
John
Related Content
- 9 months ago
- 3 years ago
- 4 years ago
- 5 years ago
Recent Discussions
- 39 minutes ago
- 3 days ago