Can't select a value in a XCUIElementTypePickerWheel


Please see screenshot below as I unable to select value of XCUIElementTypePickerWheel using NightwatchJs automation for iOS app. kindly provide any approach or solution. thanks.

Even I do have the same issue. Anybody has solution?

Just write what you tried and failed.

For the wheel picker, you need to select by indices,
In your instance, if you need to select a desired value from the picker, you can try the below code,
actionClick(locator,“Select value from wheel picker”); // Click on the wheel picker to open the list
List role = createElements(“**/XCUIElementTypeDatePicker[name == 'test-DateTimePicker']/XCUIElementTypePicker/XCUIElementTypePickerWheel”);
// click on done button

Beautified code:

List<WebElement> roleWheelPicker = createElements("**/XCUIElementTypeDatePicker[`name == 'test-DateTimePicker'`]/XCUIElementTypePicker/XCUIElementTypePickerWheel");