I am trying to create a javascript action that will select a button (ranging from 1-5; in this example I included 3). Each of these buttons are separate Kinds. I have very limited (or no experience with coding), but have managed to come up with the following based on various forums online:
Code: Select all
var Bt1 = Global.Browser.SelectKind("button1")
var Bt2 = Global.Browser.SelectKind("button2")
var Bt3 = Global.Browser.SelectKind("button3")
var myArray = ['Bt1' , 'Bt2', 'Bt3'];
var rand = myArray[Math.floor(Math.random() * myArray.length)];
Any help with this would be greatly appreciated!