Cannot use UI Testing to adjust pickerView which uses a view-based delegate
Originator: | lewis | ||
Number: | rdar://22918650 | Date Originated: | 30-Sep-2015 11:30 AM |
Status: | Open | Resolved: | |
Product: | iOS SDK | Product Version: | Xcode 7.0.0 |
Classification: | Reproducible: | Always |
Summary: When using UI Testing's adjustToPickerWheelValue, it fails with UI Test Activity: Assertion Failure: UI Testing Failure - Internal error: unable to find current value 'Foo, 1 of 3' in possible values Foo, Bar, Baz for the picker wheel "Cheeseburgers" PickerWheel It is because the accessibility value of the element is '<TITLE>, 1 of N' instead of just <Title>, and it expects to find the current accessibility value in list which it doesn't Steps to Reproduce: 1. Create a picker whos delegate uses `pickerView(pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusingView view: UIView?) -> UIView` 2. Try to create a UI Test that calls adjustToPickerWheelValue to a value Or run `testExample` in attached Xcode project Expected Results: It should succeed Actual Results: It fails with UI Test Activity: Assertion Failure: UI Testing Failure - Internal error: unable to find current value 'Foo, 1 of 3' in possible values Foo, Bar, Baz for the picker wheel "Cheeseburgers" PickerWheel
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!