Sorry for this question, I understand, for somebody this is easy, but I need help
For example I have:
@FindBy(xpath="example")
private List<WebElement> exampleList;
And I need to click on the random item in the list:
public void clickOnRandomItemInList() {
exampleList.get(i).click; //how I can randomize "I"
}
I tried this one:
Random randomize = new Random()
public void clickOnRandomItemInList() {
exampleList.get(randomize.nextInt(exampleList.size)).click; //but this way doesn't work
}