schumyspain
schumyspain

Reputation: 146

UIPicker not selectable while UI Testing

I'm trying to create a test for a flow in my app that includes two UIPickerView and I'm unable to select them while running in the "record" mode of Xcode. Also if I check the count of datePickers, pickers or pickerWheels I always get back 0. Any idea of what can be causing this issue?

Upvotes: 4

Views: 225

Answers (1)

Alper
Alper

Reputation: 3973

I find Joe Masilotti's stuff to be indispensible when UI Testing.

Like he says you can do:

app.pickerWheels.element.adjust(toPickerWheelValue: "Picker Wheel Item Title")

Don't bother yourself doing this in Record mode. Only use that to get a general idea and quickly do stuff. As soon as things get complicated and you want to get serious, you shouldn't use it anymore.

Upvotes: 1

Related Questions