I have a WebTable, I want to check a row I have inserted through a field earlier in the test is now in the table.
I have two approaches to this, neither of which I can get to work:
*Using a text checkpoint on the page to look for the unique field value of the row I just inserted.
but how do I look for the variable I inserted into the table?
''Insert row into table using a form, where one of the fields has Id passed for its value..
Now I want to use Id as a Parameter to 'checked text'... how
*Second idea, use a Table Checkpoint, but how do I seach the entire table for a specific valued row, all I see is where a specific cell is validated, and I don't know what cell number it will be in (depends whats previously been added to the table).
In your case you can use couple of approaches to verify that the data is added or not.
1. When you add the data usually the data is added at the end of the grid, so you can simply check the last record of the grid by using ROWCOUNT method.
2. Use a FOR loop to get to the new row
you can use ROWCOUNT to get the number of rows,
you can use GetCellData to retrieve data from a particular cell.
By using both in the for loop you can get the row number of the newly added row. Using the row number you can get the data in remaining columns of the row.
You can use if and for loops to obtain the data which you entered.
getrow count, suppose x rows
run the for loop for x times and include if in that giving the data you entered in the If condition.