VSFlexGridFunctions
Last Updated:
Functions and Actions for VSFlexGrid objects.
This serves as an example of a new core library servicing a custom component.
VSFlexGridFunctions::ClickCell
Attempts to perform a single Click on a table cell.
The cell to Click is provided in separate row and col
parameters. Missing parameters indicate index=1. The
indexes are 1-based. That is, the first row is row 1.
The first col is col 1.
Logical Cells are those data cells viewable to the
user. They do not include hidden or fixed cells.
Thus, the first top left cell for real grid data
is considered cell 1,1.
The grid will remain in edit mode if edit mode goes
active.
Fields: [ ]=
Optional with Default Value
- [ row = ]
The 1-based logical row to select.
If no row is provided then row=1 is assumed.
- [ col = ]
The 1-based logical col to select.
If no col is provided then col=1 is assumed.
Examples:
-
T, AWindow, AGrid, ClickCell, ^row=2, ^col=1
Attempts to Click the first data cell in the second
data row.
Note, the DDVariables shown are not necessary but are
shown for clarity. The grid will remain in edit mode
if active.
[How To Read This Reference]
VSFlexGridFunctions::SelectCell
Attempts to perform a Select on a table cell.
The cell to Select is provided in separate row and col
parameters. Missing parameters indicate index=1. The
indexes are 1-based. That is, the first row is row 1.
The first col is col 1.
Logical Cells are those data cells viewable to the
user. They do not include hidden or fixed cells.
Thus, the first top left cell for real grid data
is considered cell 1,1.
We will ESCAPE out of edit mode if edit mode goes
active.
Fields: [ ]=
Optional with Default Value
- [ row = ]
The 1-based logical row to select.
If no row is provided then row=1 is assumed.
- [ col = ]
The 1-based logical col to select.
If no col is provided then col=1 is assumed.
Examples:
-
T, AWindow, AGrid, SelectCell, ^row=2, ^col=1
Attempts to Select the first data cell in the second
data row.
Note, the DDVariables shown are not necessary but are
shown for clarity. We will ESCAPE out of edit mode
if active.
[How To Read This Reference]
VSFlexGridFunctions::VerifyValuesToFile
Verify the string values of a grid block to a file benchmark.
Grid rows and cols are considered 1-based. You can specify a
subset of the grid by providing the optional values for
rowMin, rowMax, colMin, colMax. The benchmark and the actual
will be stored as TAB delimited files.
Typically, benchmarks are stored in the Datapool\Bench directory.
Fields: [ ]=
Optional with Default Value
-
BenchmarkFile
The name of the file used as the comparison benchmark.
The name of the file used as the comparison benchmark.
Typically, benchmarks are stored in the Datapool\Bench directory.
In that event, only the filename.ext is needed.
Benchmarks and captures will be TAB delimited files.
- [ rowMin = 1 ]
The first row to include in the capture and compare.
By default, the first row of the grid is used.
- [ rowMax = ]
The last row to include in the capture and compare.
By default, the last row of the entire grid is used.
- [ colMin = 1 ]
The first col to include in the capture and compare.
By default, the first col of the grid is used.
Columns can also be specified by full or partial
column header text.
- [ colMax = ]
The last col to include in the capture and compare.
By default, the last col of the entire grid is used.
Columns can also be specified by full or partial
column header text.
Examples:
-
T, Window, VSFGrid, VerifyGridToFile, "bench.ext"
Verify the entire grid with the provided benchmark.
The benchmark file is located within the Project at Datapool\Bench\bench.ext
The captured file is located within the Project at Datapool\Test\bench.ext
The difference file is located within the Project at Datapool\Dif\bench.ext
Since no optional block parameters were provided, the entire
grid is captured and compared. This is NOT recommended for
large grids as this can take much time.
-
T, Window, VSFGrid, VerifyGridToFile, "bench.ext", 1, 5
Verify only the first 5 rows of the grid against the benchmark.
The comparison is a straight file compare, so the benchmark must have
the same number of rows and columns as the newly captured data.
-
T, Window, VSFGrid, VerifyGridToFile, "bench.ext", 1, 5, 3, 6
Verify only the first 5 rows and columns 3 to 6 of the grid against the benchmark.
The comparison is a straight file compare, so the benchmark must have
the same number of rows and columns as the newly captured data.
-
T, Window, VSFGrid, VerifyGridToFile, "bench.ext", 1, 5, "First Name", "Zip Code"
Verify only the first 5 rows and columns "First Name" to "Zip Code".
The comparison is a straight file compare, so the benchmark must have
the same number of rows and columns as the newly captured data.
[How To Read This Reference]