...
Command | Examples | Explanation |
---|---|---|
save value of <Locator> as <Variable> | save value of textbox with id "textboxId" as userInput | Saves the "value" attribute of the element as the stated variable, or if the attribute doesn't exist, the text contained by the element. Requires Toffee Performer version 723 or higher. |
save attribute "<Attribute>" of <Locator> as <Variable> | save attribute "href" of link "Documentation" as DocLink | Saves the specified attribute of the element as the stated variable. If the attribute does not exist for the element, the step will fail. Requires Toffee Performer version 723 or higher. |
Save Random Values
Command | Examples | Explanation | |
---|---|---|---|
save random number from <Start> to <End> as <Variable> | save random number from 1 to 6 as D6roll | Saves a random number between the start and end numbers inclusively as the stated variable. | |
save random [case] <type> string of length <Length> as <Variable> |
| Saves a random grouping of letters and numbers of the specified length as the stated variable. The case is optional and can either be lowercase or uppercase. If the case is not defined, then mixed-case will be used for all types. The four possible types are alpha (only letters), numeric (only numbers), alphanumeric (letters and numbers), and hexadecimal (0-9 and A-F). | |
save random lowercase alphanumeric string of length 8 as AlphaNums | |||
save random uppercase hexadecimal string of length 6 as bgColor | |||
save random [case] <type> string with spaces of length <Length> as <Variable> | save random uppercase alphanumeric string with spaces of length 8 as 09AZwSpaces | Saves a random grouping of letters, numbers, and spaces of the specified length as the stated variable. As above, the case is optional and either lowercase or uppercase, and there are the four types: alpha, numeric, alphanumeric, and hexadecimal. | |
save random regex "<Regular Expression>" as <Variable> | save random regex "([1-9]\d{1,2}) (red|green) apples" as inBasket | Generates a random string that matches the regular expression and saves it as the stated variable. Any grouping that specifies a range without an upper limit defaults to the lower limit + 10. In other words, | |
save random mask "<Mask>" as <Variable> | save random mask "pl'ate '# AAA-####" as plate | Generates a random string that matches the mask given and saves it as the stated variable. Specific characters get replaced by the mask. All other characters do not get replaced by the mask. The characters are as follows: | |
# | Digit (0-9) | ||
a | Lowercase letter (a-z) | ||
A | Uppercase letter (A-Z) | ||
Z | Either-case letter (a-z or A-Z) | ||
n | Lowercase letter or digit (a-z or 0-9) | ||
N | Uppercase letter or digit (A-Z or 0-9) | ||
M | Any letter or digit (a-z, A-Z, or 0-9) | ||
h | Lowercase hexadecimal digit (0-9 or a-f) | ||
H | Uppercase hexadecimal digit (0-9 or A-F) | ||
J | Any hexadecimal digit (0-9, a-f, or A-F) | ||
' | Make the next character definitely a literal |
...