Provides variable data storage
Madcow provides an intuitive method for providing data parameters to Madcow tests.
To define a data parameter in a Madcow test we use the @ symbol followed by the name you give the data parameter.
@myFirstName=MadcowTo use a data parameter in a Madcow test we again use the @ symbol followed by the name of the data parameter you require.
firstNameField.value = @myFirstNameMadcow provides the ability to store the value of a web page element during test execution and then to use the stored value within the Madcow test.
To define a runtime data parameter in a Madcow test we use the Madcow store operation on an web page element passing it the name of the data parameter to store.
generatedReferenceNumber.store = MyReferenceNumberTo use a runtime data parameter in a Madcow test we again use the @ symbol followed by the name of the stored data parameter.
searchField.value = @MyReferenceNumberMadcow provides the following common global data parameters.
| @global.currentDate | dd/MM/yyyy |
| @global.currentTime12hr | hh:mm a |
| @global.currentTime24hr | hh:mm:ss |
| @global.currentDateTime12hr | dd/MM/yyyy hh:mm a |
| @global.currentDateTime24hr | dd/MM/yyyy hh:mm:ss |
To use a global data parameter in a Madcow test we again use the @ symbol followed by the name of the global data parameter.
date.value = @global.currentDate
time.value = @global.currentTime24hrData Parameters can be used within a list and with the Madcow table syntax.
@newZealand = NZD
@australian = AUD
@japanese = JPY
@selectDollarFieldValues = [@newZealand, @australian, @japanese]
dollarList.verifySelectFieldOptions = @selectDollarFieldValues@selectedCountry = New Zealand
@selectedCountryCurrency = NZD
@selectRowCriteria = ['Country' : @selectedCountry]
@searchResultsCheckValues = ['Country' : '@selectedCountry', 'lastColumn' : '@selectedCountryCurrency']
searchResults.table.selectRow = @selectRowCriteria
searchResults.table.currentRow.checkValue = @searchResultsCheckValuesData Parameters can be used within a Madcow Value. This allows partial substitution of the value with the data parameter.
This is done through @{...} syntax, with the contents within the curly braces defining the name of the data parameter.
@expectedResultCount = 20
verifyText = There are @{expectedResultCount} countries foundSymbol that start with “@” sign as value can be also treated a string value by appending curly braces “{}” between them.
@invalidEmail = {@gmail.com}, this will be saved as invalidEmail = "@gmail.com"
id.value = {@gmail.com}