Why is the value of the picker wheel have “, X of Y” appended to the string value of the picker?

How can this be controlled? For example, I have 4 different options in my picker wheel (a blank “ ” option, BUDGET, MISC, and WORK ISSUE). If my current value of the picker wheel is BUDGET, and I call the adjustToPickerWheelValue() method to change it to MISC, I will get an error “UI Testing Failure – Internal error: unable to find current value ‘BUDGET, 2 of 4’ in possible values BUDGET, MISC, WORK ISSUE…”. It’s the “, 2 of 4” that is messing the value up. This is also the value of the picker wheel I see when I use the simulator’s accessibility inspector tool.

Also...

We have search fields embedded in the same component as our Segmented Control and the testing framework is unable to interact with it. If I record my actions in XCode, when I tap this search bar, it records the code app.tables.searchFields[“Search”].tap(), but this line does not execute properly. An error is raised that the framework cannot find the element. I have even tried to query the element by using app.descendantsMatchingType(.SearchField).element, but that still would not return the results I was looking for.

Replies

This still seems to be an issue for me. I can not set the picker at all the above suggestion does not work. Will there be a fix for this issue in the forseeable future? Please advise thanks.

I've had a similar issue, but not gotten any trction on it after reporting it almost two years ago.


When adjusting a picker with multiple wheels, it will onlhy adjust the wheel one position regardless of how many are require to reach the tequested value.


adjust(toPickerWheelValue: "None")


https://bugreport.apple.com/web/?problemID=27818469


Thoughts?

I guess this bug is never going to be fixed.. or is there any hint if there will be a fix in the near future?

I have the same issue (on Xcode 10.1). Did you ever find a solution?

Issue was solved around XCode 11.2 but is broken again in XCode 11.5 when trying to adjust 1 out of 5 pickerwheels.

My solution for datePickerWheel adjustments  https://medium.com/@iliapavlov314/swiftui-not-supported-adjusting-picker-wheel-value-7640adb2b3e8