I'm working with an Infragistics table and Test Advantage. I'm using QTP 11. Many of the methods for communicating with the Infragistics grid/table are the same as other tables. For example .GetRowCount and .GetCellData seem about the same.
Now I need to enter a value in a cell. I do not know if the cell is a swfEdit or swfDropdown. How can I find out?
Could I use:
err.number and err.description to see which one has an error code of 0?
I think that's just backwards thinking. As you write a test, you should have expectations of a certain cell being an edit or dropdown. Rather than a test that just says enter something in some cell, I don't care what it is.
But if you want to go that route, I would use Exist statements rather than intentionally trigger errors.
If objectDefinedasEdit.Exists Then
type in edit
Else if objectDefinedasDropDown.Exists Then
select from dropdown
report neither edit nor dropdown existed in cell(x,y)