Random function

hello @ferrariklersone
Add the xpath information of your buttons to a list. I can suggest you a code process like the one below.

List<TestObjects> randomObjects = Arrays.asList(findTestObject('Path/To/TestObject1'), findTestObject('Path/To/TestObject2'), findTestObject('Path/To/TestObject3'))

Random rand = new Random()String  
randomPath = randomObjects.get(rand.nextInt(randomObjects.size()))WebUI.click(findTestObject(randomPath))
1 Like