This action is designed for selecting an item at random from a predefined list of items. An example use for this action would be for selecting a search term at random and then using it in a SendKeys, From or FormSelector actions to enter the search term in a text field.
Firstly, we need to configure the PickItem action. Here we are defining a list of three search terms (items) to pick from and the name to assign the selected item to a name, here we have chosen ‘searchterm’ as we are inputting products into a search box.

Next, we need to use the selected item in a text input action. In this example, we will use the SendKeys action.
To use the selected item, enter $ScriptVariable.<Name>
where <Name>
is the name you gave when setting up the action.
This example does exactly that and inputs the value into the #search.input-text
input field:
Finally, the full step together. The prerequisite is that the journey is on a page with the search field present and the intention of the step is to pick a search term at random, enter it into the search field, submit the search and wait for products to be returned.

