Detox: UIPickerView does not contain desired value

Sorry guys, but all about iOS Picker was closed without any conclusion. I have exactly the same issue as https://github.com/wix/Detox/issues/798. Also, the question on stackoverflow has no answer https://stackoverflow.com/questions/50082463/testing-picker-with-detox-in-react-native

so

if I use “testID”: await element(by.id('testIdPicker')).setColumnToValue(0, 'en'); I get "Description" : "Interaction cannot continue because the desired element was not found." If I use “type”: await element(by.type('UIPickerView')).setColumnToValue(0, 'en'); I get "Description" : "UIPickerView does not contain desired value!"

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 9.0.4
  • React Native: 0.57.4
  • Node: 11.1.0
  • Device:*
  • Xcode: 10.0
  • macOS: 10.13.6

detox

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

I’ll be providing a fix soon. As a bonus, I will also simplify setting picker values in RN date pickers (allow selecting by id, not just by class).

I tested the new implementation and it seems to be working properly now. Thanks @LeoNatan 🥇 👍

Thanks!