How-to
Select option (selectOption)
Select option (selectOption)
Selects an item in a <select> or compatible list. Value is the option value or visible label - as the product and Playwright accept.
Step model
action_name | selectOption |
| Group | Input |
| Target | Required |
| Value | Required (text) |
| expected_value | Unused |
| TEST_ACCOUNT | Allowed |
| Do not confuse with | click |
Target/Value facts match the source-of-truth catalog and Autotest step.
Prerequisites
- Target points to the select control.
Steps
- Add a
selectOptionstep. - Set the select Target.
- Put the desired option in Value.
- Save.
The step is stored on the autotest. Next - neighbouring steps or autotest run creation.
Examples
Member role
Fields in the UI:
| Field | Value |
|---|---|
action_name | selectOption |
| Target | kind LABEL, value Role |
| Value | Member |
| value_source_type | INLINE |
Step JSON fragment (copy-paste):
json
{
"action_name": "selectOption",
"target": {
"kind": "LABEL",
"value": "Role"
},
"value_text": "Member",
"value_source_type": "INLINE"
}Common mistakes
- Do not drive a custom dropdown with selectOption - that is not a native select.
Screenshots
Screenshots of the step form for selectOption will be added here in a later pass.
Did this page help?