> For the complete documentation index, see [llms.txt](https://kaliostest-nouvelle-version.gitbook.io/web-actions-list/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kaliostest-nouvelle-version.gitbook.io/web-actions-list/input/selectbytext.md).

# selectbytext

Select a dropdown, a checkbox or radiobutton.

#### **For dropdown :**

| Variable  | Value | Description                               |
| --------- | ----- | ----------------------------------------- |
| Property  | text  | text display on the screen. Can be empty. |
| Parameter | item  | item to select in the list                |
|           |       |                                           |

The associated `label`, `aria-label`, `name`, `current selected item` or `adjacent text`can be used to identify the list.

For example, in <https://webactions.w3spaces.com/select.html>, the car list has a `label` "Choose a car:"

![](/files/eDSEdT94ybMarSNrkfUI)

if we use the action "selectbytext" with Property="Choose a car:" and Parameter="Opel", it will select the item Opel in the car list :

![](/files/no6uX678O3msrvWmPhbt)

if we use the action "selectbytext" with Property=empty and Parameter="Volvo", it will select the item Volvo in the car list&#x20;

![](/files/kmaEsY1NJYJI9n9q9m6x)

{% hint style="info" %}
We can use context to manage duplicated text. For example, if we use the action selectbytext with Property="Choose a car:|context=create a drop-down list" it will search for the car list in the context of "create a drop-down list" .
{% endhint %}

#### **For checkbox :**

| Variable  | Value | Description                                       |
| --------- | ----- | ------------------------------------------------- |
| Property  | text  | text (or part of the text) display on the screen. |
| Parameter | yes   |                                                   |
|           |       |                                                   |

The associated `label`, `aria-label`, `name`, `value` or `adjacent text` can be used to identify the checkbox.

For example, in <https://webactions.w3spaces.com/checkbox.html>, the bike checkbox has a `label`"I have a bike"

![](/files/7qYQMmh1zTRovBSZsdXW)

if we use the action "selectbytext" with Property="I have a bike", it will check "I have a bike":

![](/files/qXd2Za8tOq0vpLGObFob)

We can set property with 2 texts seperated by a "|". In this case it will search for a check box in a group described by its text.

For example, if we use the action "selectbytext" with property="Show Checkboxe&#x73;**|**&#x49; have a car", it will check I have a car in the group Show Checkboxes:

![](/files/azMyGiUnPmoJ2Fl0GPA0)

{% hint style="info" %}
We can also use context. For example, if we use the action selectbytext with Property="I have a car:|context=Show Checkboxes", the result is similar with property="Show Checkboxes|I have a car"
{% endhint %}

#### **For radio button :**

| Variable  | Value | Description                                       |
| --------- | ----- | ------------------------------------------------- |
| Property  | text  | text (or part of the text) display on the screen. |
| Parameter | yes   |                                                   |
|           |       |                                                   |

The associated `label`, `aria-label`, `name`, `value` or `adjacent text` can be used to identify the radio.

For example, in <https://www.w3spaces-preview.com/webactions/radio.html>, a radio button has a  `label` "31 - 60"

![](/files/yYnAszVaptYChMPShKNK)

If we use the action "selectbytext" with property="31 - 60", it will select the radio 31 - 60 :

![](/files/qzFvce5ofboIPWgKHsiu)

We can set property with 2 texts seperated by a "|". In this case it will search for a radio in a group described by its text.

For example, if we use the action "selectbytext" with property="your ag&#x65;**|**&#x30;-30", it will select 0-30 :

![](/files/lxdcGyI0HFRKAedoiCFi)

{% hint style="info" %}
We can also use context. For example, if we use the action selectbytext with Property="0-30:|context=your age", the result is similar with property="your age|0-30"
{% endhint %}
