The text in cells in the first row of a table following the fixture name are available to the fixture as a string array named Args, e.g.:
string anArgument = Args[i];
sample do |
check | argument count | 0 |
sample do | with | some | arguments |
check | argument count | 3 |
check | get argument | 0 | with |
check | get argument | 1 | some |
check | get argument | 2 | arguments |
The Args array returns the raw text in the argument cells. To process the argument cells like other input cells, e.g., retrieving symbol values or parsing arrays, use the GetArgumentInput method with the argument index and the desired type, e.g.:
var anArgument = GetArgumentInput<string>(i);
cell handler story |
string | string? |
symbol value | >>mysymbol symbol value |
cell handler loader |
load | symbol recall handler | fitlibrary |
sample do | with | <<mysymbol symbol value | 1,2,3 |
check | get argument input as string | 1 | symbol value |
check | get argument input as array | 2 | 1, 2, 3 |