Basic Operations

Base operations for general use


Madcow Operations

Operations are what a user must specify in order to make Madcow interact with the site under test. A testcase (or .GRASS file) is essentially made up of a sequential list of operations (with a scattering of comments and other things). Each of these lines is referred to as a Blade.

Standard Blade Operation Sytax

Each blade (or line) in a .GRASS file is made up of at least two components. They are of the following format:

1. Madcow Operator . 2. MadCow Operation = 3. Operation Parameters

  1. the optional HTML ID (or mappings file name) of the element to perform the operation on followed by a fullstop, known as the "selector" or "operator"
  2. the Madcow 2.0 operation to perform on that element and, in some cases
  3. an equals sign = with any parameters to provide to the Madcow operation.

Blade Operation with Parameter

For example:

commentTextBox.value = These values will be used by the madcow value operation
would perform the [Value] operation, effectively setting the value attribute on the input field, with the HTML ID commentTextBox. It would use the parameter "These values will be used by the madcow value operation" as it's new value.

Blade Operation with No parameters

However for some Madcow operations, the equals sign = is not always needed as some operations do not require nor accept any parameters. For example:

submitCommentButton.clickLink

will simply perform the [Click-Link] operation and click on the button with HTML id submitCommentButton.

Page Level Blade Operation

Furthermore other Madcow 2.0 operations don't require a specific HTML element to operate on because they apply to the entire HTML page. For example:

verifyText = Save Comment

will simply perform the [Verify-Text] operation on the entire HTML page, effectively searching the current page for the text "Save Comment".

More Complex Blade Operations

Some operations will even support multiple parameters being provided to them. These are provided a map
by using [ square brackets ] around the parameters. They would follow this type of format:

[Optional HTML Element Id].operation = [paramter1 : "value1", parameter2 : "value2"]

For example:

        #Select the row where 'country' equals 'Australia' and 'state' equals 'Queensland'
        searchResultsTable.table.selectRow = [country : 'Australia', state : 'Queensland']