It’s easy. Use execute Script to generate a random number. This macro selects a random drop down box value:
{
"Name": "random",
"CreationDate": "2021-2-9",
"Commands": [
{
"Command": "open",
"Target": "https://ui.vision/contact",
"Value": ""
},
{
"Command": "type",
"Target": "id=ContactName",
"Value": "Random test"
},
{
"Command": "comment",
"Target": "Create random number between 0 - 4",
"Value": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Math.floor(Math.random()*4);",
"Value": "randomvalue"
},
{
"Command": "echo",
"Target": "${randomvalue}",
"Value": "blue"
},
{
"Command": "select",
"Target": "id=WhatSoftware",
"Value": "index=${randomvalue}"
}
]
}