Parameter Object
Description
An input or output action parameter.
This object can be used in the parameterized value of a step or in a call to an action in order to parameterize the value of one of the input parameters supplied to the called action or to indicate the storage location for one of the output parameters supplied to the called action.
For more details on supplying parameters when calling an action, see RunAction Statement.
Syntax
Parameter(ParamName)
Argument | Type | Description |
---|---|---|
ParamName | String | The name of the action parameter. |
Examples
Suppose you have test steps that select the quantity of a product and add the product to the cart in order to display a list of the added product in a table, and then return the total price of the product in the table.
To use this syntax, you must define the parameters first in the Parameters tab of Properties pane. The test syntax of this example might look something like this:
'Define an input action parameter called Quantity so that the Shopping Cart table that is displayed
'is controlled by the input parameter value passed when the test is called.
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("quantity").Set Parameter("Quantity")
Browser("Advantage Shopping").Page("Advantage Shopping").WebButton("save_to_cart").Click
Browser("Advantage Shopping").Page("Advantage Shopping").Link("ShoppingCart").Click
NumTableRows = Browser("Advantage Shopping").Page("Advantage Shopping").WebTable("PRODUCT NAME").RowCount
Dim ValidTableRows
ValidTableRows = NumTableRows - 2 'Remove invalid rows as the sample table is not a standard table
'Define an output parameter called PriceData to store the returned data of a specified cell.
Parameter("PriceData") = Browser("Advantage Shopping").Page("Advantage Shopping").WebTable("PRODUCT NAME").GetCellData(ValidTableRows, 6)
The following example uses the syntax to parameterize a checkpoint property value. To use this syntax, you must define the parameter first in the Parameters tab of Properties pane.
Parameter("disabled") = False
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("emailAccountDetails").Check Checkpoint("emailAccountDetails")
Properties
Item | Retrieves the current value of the specified Parameter object. |
Item Property
Description
Retrieves the current value of the specified Parameter object.
Syntax
Val=Parameter.Item(ParamName)
Argument | Type | Description |
---|---|---|
ParamName | String | The name of the action parameter for which you want to retrieve the value. |
Val | Variant | The location in which you want to store the retrieved value. |
The following example uses the Item property to retrieve the current value of the Axn1_in2
input parameter.
CurrVal = Parameter.Item(Axn1_in2)
See also:
- Crypt Object
- DataTable Object
- Description Object
- DeviceReplay Object
- DotNetFactory Object
- DTParameter Object
- DTSheet Object
- Environment Object
- Extern Object
- Parameter Object
- JSON Object
- JsonUtil Object
- MercuryTimers Object (Collection)
- MercuryTimer Object
- NV Object
- OptionalStep Object
- ParallelUtil Object
- LocalParameter Object
- PasswordUtil Object
- PathFinder Object
- PDFUtil Object
- Properties Object (Collection)
- QCUtil Object
- RandomNumber Object
- Recovery Object
- Remote Connection Object
- Reporter Object
- RepositoriesCollection Object
- Repository Object
- Services Object
- Setting Object
- SystemMonitor Object
- TestArgs Object
- TextUtil Object
- UIAutomation Object
- VisualRelation Object
- VisualRelations Object
- VisualRelationsCollection Object
- WebUtil Object
- XMLUtil Object