Get_Property
Description
Gets the property value of an HTML object and
assign to the prop=value
parameter. Also
stores it to the variable in ret=&variable
.
Use the browser's in-built element inspector to identify the properties and values of an object.
See Recording Tests
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
| Parameter | Description |
|---|---|
|
prop=value; |
The property name. |
|
ret=&variable; |
The return value. |
Example
| Type | Action | Recognition | Parameters | Value |
|---|---|---|---|---|
|
Text |
Get_Property |
Name=UserID |
ret=&TxtPropp;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 |