Forum Discussion
- Hassan_BallanFrequent Contributor
I have no idea what 'AcuGridClass' is and googling gets no hits.
If you are testing Web Page and the table is HTML, maybe this would help https://support.smartbear.com/testcomplete/docs/app-testing/web/general/examples/parsing-html-tables.html
- JDR2500Frequent Contributor
I have worked with a variety of grids in desktop applications but not anything by that name. Hopefully I'm not telling you what you already know.
There are two scenarios I often encounter:a) TC recognizes the grid as a grid and provides access to the contents (e.g. cells, rows, columns, etc.) via various properties and methods that can be viewed using the object spy as seen below and utilized in scripts.
The wValue property, as seen above, will let you get any cell value by specifying the row (by index only) and column (either by index or header text).
The indexes are zero-based so the seventh column would be 6. You could get the value of the first cell in that column something like this:
value = mygrid.wValue 0, "Status"
or using indexes:
value = mygrid.wValue 0, 6b) TC doesn't recognize the grid and therefore the grid related properties and methods don't work. In this case I have used the ugly solution of clicking in the top left cell of the grid (e.g. mygrid.Click 5,5) and then sending arrow keystrokes (e.g. mygrid.Keys("[Right][Right][Down]") to navigate to the cell with the value I want to verify. Once the cell is selected, I copy the value to the clipboard (e.g. mygrid.Keys("^c") and verify it with a clipboard checkpoint. Sorry I only do VBScript.
If (aqString.StrMatches("27", Aliases.Sys.Clipboard) = True) Then Call Log.Checkpoint("The value is correct.") Else Call Log.Warning("The expected value was not found") End If
The second method I've used when TC doesn't recognize the grid is the IQ Add-in. It can recognize tables and contained values. Here is a link to the relevant help topic:
OCRTable Object | TestComplete Documentation (smartbear.com)
Again, I apologize in advance if all of this is already known to you.
- Karthik_gowdaOccasional Contributor
Thanks for your inputs. Yes, this approach was my initial plan, however , unfortunately wValue is not a property of the grid , also tried using rowCount and Cellvalue, also not a property and there are no child for the grid , I apologize for not giving this information earlier, attached the screenshot and available properties for this
- rraghvaniChampion Level 3
Ask your developers, what technology they use for the application. Then check if it's supported by TC via https://support.smartbear.com/testcomplete/docs/general-info/supported-technologies/index.html
Related Content
- 11 months ago
- 3 years ago
- 9 years ago
- 5 years ago
Recent Discussions
- 15 hours ago
- 16 hours ago
- 4 days ago