|Actions / User-defined actions|
An action argument can have one of several possible data types.
Once you have defined an argument in an action worksheet, and then checked in the action, the new argument appears as a node in the TestArchitect explorer tree, under the node of its parent action.
Modifications to an argument's attributes have no direct effect on its parent action's definition (that is, on the action worksheet). They do, however, allow TestArchitect to assist you at the time of test writing. When you write an action line calling a user-defined action, the editor provides assistance with arguments that have modifier specifications, helping to ensure that the values you provide are consistent with the modifiers. The form of this assistance depends on the type of the argument involved, as discussed below.
This is the default type that is assigned to an argument when it is created. Any value is accepted as a literal string.
DateWhen you enter data into an argument field of the Date type, you have the option of either typing a date directly in, or allowing TestArchitect to assist you with a pop-up calendar control. The calendar control is invoked by hitting Ctrl + Spacebar, or by putting the cell into a text-insertion state. (That's what you're in when you see the blinking text cursor in the cell). Next, click the triangle button that appears. Once in the calendar control, you may navigate to the date you wish to insert, then simply click it.
|mmmm dd,yyyy||december 27,2011|
|dddd,mmmm yyyy||tuesday,december 2011|
The Argument Modifier field of a Value Set argument is where you specify the value domain. Your modifier may be as straightforward as a simple list (1, 2, 3, 4, 5), or can involve complex expressions in which the value domain depends on the contents of one or more other argument fields. For example, for a given action, an argument named car model might have different value domains, depending on the existing contents of the car type (standard, compact, premium, or minivan) argument.
|4||<> or !=||not equal to|
|4||>=||greater than or equal to|
|4||<=||less than or equal to|
Conditional statements are evaluated from left-to-right. The operative value domain is the one connected with the first conditional statement that is satisfied. Subsequent conditional statements are ignored. For example, assume the following contents of a modifier field for the apparel argument:
|5||not||Value is TRUE if its operand is FALSE.|
|6||and||Value is TRUE if and only if both sides of the and operator are TRUE.|
|7||or||Value is TRUE if either side of the or operator is TRUE.|
Parentheses may be used in statements with multiple conditionals, in order to override the default order of precedence.
The asterisk ( * ) may be used as a wildcard to represent any value. This applies to conditionals as well as value set lists. In the latter case, it indicates an open value domain. In the case of conditionals, it is useful at the end of a list of conditional value set expressions, to indicate the default value set (see the table below).
|country||US, Canada, Mexico||Example of a simple value set. Only US, Canada and Mexico are acceptable. All other values are displayed in red in the editor.|
|country||US, Canada, Mexico, *||US, Canada, and Mexico appears in the drop-down list, but any other input is accepted (that is, not displayed in red).|
|city||country=US: Los Angeles, Chicago; country=Canada: Montreal, Vancouver; country=Mexico:*||
|zip code||country=US and city=Los Angeles: 90001, 90002, 90003; country=US and city=Chicago: 60601, 60602, 60603; country=Canada: *, country=*: n/a||
This argument type is used to pass the name of an interface entity to an action. When an argument has the Interface Entity type, you are presented with a drop-down list of interface entities to choose from. The list includes all interface entities defined in the project.
This argument type is used to pass the name of an interface element to an action.
After setting this option, arguments in action lines that pass default values are hidden in the test editor when you save the file.