Click on each item on a java application list


I would like to know how to program a robot to click on each element on a list in a java application.


First I would check if each element has a selector, to be parameterized using a counter/variable.
Next I would hope for some keyboard alternative (arrows, tabs, enter).
Very much depends on the application itself though.