I am having problems scrolling up in a spinner to select the first item in a Robotium test case. Here is my code:
int pos = solo.getCurrentSpinners().get(0).getS
The API to use here with Robotium is rather flaky, so I decided to go down the direct API route:
instrumentation.runOnMainSync(new Runnable() {
@Override
public void run() {
Spinner spinner = (Spinner) solo.getView(resourceId);
spinner.setSelection(position, true);
}
});
This won't show you the popup of the Spinner, but it will select the desired item.