VerifyFileRangeValue Method (Table)

Class

Table.

Action

Verifies that the values in a specified range in a table are the same as the expected values contained in a file of values.

Availability

This method is supported only in scripts that use the Classic Agent.

Syntax

table.VerifyFileRangeValue(sPath, Range[, nTimeout])
Variable Description
sPath The pathname of the file to verify. STRING.
Range The range of the table to verify. TABLERANGE.
nTimeout Optional: The number of seconds to wait for the expected value to be achieved. NUMBER.

Notes

The VerifyFileRangeValue method retrieves the values contained in the cells specified by Range and stores them in a file with the same specification as sPath, but with an .rbl extension. It uses the GetFileRangeValue method to do this. VerifyFileRangeValue then verifies the values in that file against the values stored in the file you specified in the method.

It is not practical to hand-code a call to this method. Recording a verification of a table generates the file containing the expected value as well as the call to VerifyFileRangeValue.

If you are doing distributed testing, sPath resides on the host machine.

This method creates files in ANSI format.

If a timeout is specified with the nTimeout parameter, Silk Test Classic calls VerifyFileRangeValue() until the condition is verified or the timeout is reached. The time between checks is the value of the window retry interval Agent option (OPT_WINDOW_RETRY). If the verification fails, an exception is thrown.

Example

In this example, the correct values for the first four columns of the first two rows of the Emp.EmpTable object are in the Vals.tbl file. VerifyFileRangeValue reads the current values in the same range of the table, generates the file Vals.rbl, and compares the contents of Vals.tbl with the contents of Vals.rbl.
Emp.EmpTable.VerifyFileRangeValue("Vals.tbl", {{1,1}, {2,4}})