Common Actions

The actions in this section can be used with multiple step types. The step types that support the action are listed with each action.

Description

Performs a mouse click on the specified object.

The following step types support this action:

Example

This example shows the use of the Click action with a Button object and a Link object:

Type

Action

Recognition

Parameters

Value

Button

Click

Name=PB_FILTER

Link

Click

Name=LAST_NAME$0

Description

Checks whether the object exists on the page.

The following step types support this action:

Parameters

Field or Control

Definition

ret=&variable;

ret=True – the object exists

ret=False – the object does not exist

expected=value

Specify expected=True or expected=False. Logs a Pass or Fail based on whether the ret parameter matches the expected parameter.

Example

This example shows the use of the Exists action:

Type

Action

Recognition

Parameters

Value

Text

Exists

Name=USERID;ret&exists

Description

Gets the property value of an HTML object based on the prop=value parameter and assigns it to the variable in ret=&variable.

Use the HTML Browser feature of the Message tool to identify the properties and values of an object.

See Using the Message Tool.

Some objects have properties that are different from what you might expect. For example:

  • The value property for a check box returns Y for selected, N for deselected.

  • Combo boxes return the translate value of the selection for the value property.

    The full text of the selected item is available as the text property.

  • Radio buttons return the translate value of the selection for the value property.

  • The label of the selected item is a separate label object.

The following step types support this action:

Parameters

Field or Control

Definition

prop=value;

The property name.

ret=&variable;

The return value.

Example

Type

Action

Recognition

Parameters

Value

Text

Get_Property

Name=UserID

ret=&TxtProp;prop=Status

Log

Message

This is the status;&TxtProp

Button

Get_Property

Name=Submit

ret=&BtnProp;prop=tagName

Log

Message

This is the tagname for the button:&BtnProp

Button

Get_Property

Name=Submit

ret=&BtnProp;prop=Value

Log

Message

This is the Value for the button:&BtnProp

Description

Gets the style value of an HTML object based on the prop=value parameter and assigns it to the variable in ret=&variable.

You can use the HTML Browser feature of the Message tool to identify the properties and values of an object.

See Using the Message Tool.

The following step types support this action:

Parameters

Field or Control

Definition

prop=value;

Where value equals the property name.

Supported property values are: font-face, font-family, font-weight, font-style, color, font-size, background-color.

ret=&variable;

The return value.

Description

Gets the label of the specified HTML object.

The following step types support this action:

Description

Sets the field value in a browser object.

The following step types support this action:

Example

Type

Action

Recognition

Parameters

Value

LongText

Set_Value

name=SQA_SIMPLEREC_SQA_DESCRIPTION

long

Text

Set_Value

name=SQE_SIMPLEREC_PSE_DESCR

ebox

CheckBox

Set_Value

name=SQA_SIMPLEREC_SQA_CHECKBOX

Y

ComboBox

Set_Value

name=SQA_SIMPLEREC_SQA_COMBO_OPTION

2

Radio

Set_Value

name=SQA_SIMPLEREC_SQA_OPTION

2

Description

Compares the value in the browser to the expected value, and adds a pass or fail log entry for the validation.

The following step types support this action:

Example

Type

Action

Recognition

Parameters

Value

Text

Verify

ID=PSE_DATES_SQA_DATE

#TODAY