I've hit a roadblock in trying to write some automated tests for my iPhone app. Judging from the documentation I feel like this should select the first row of the first component of my UIPickerView:
var picker = UIATarget.localTarget().frontMostApp().mainWindow().pickers()[0];
var aWheel = picker.wheels()[0];
var someVals = aWheel.values();
aWheel.selectValue(someVals[0]);
But instead I get the following error, logged in Instruments:
Exception raised while running script: - selectValue requires a valid value
Any ideas how I can
- Set predictable values on my UIPickerView cells/components? Currently, they all use custom UIViews, not the standard labels.
or
- Somehow get an array of values from my existing cells to iterate through?
What am I missing here?