Selecting Picker Wheel value when scrolling back is not allowed

Hi!

So I’ve got an interesting problem when trying to interact with a 3 Picker Wheel UI element designed to select a Time in application under test:

The 3 picker wheels are 1 - the Hour selector. 2 - the minute selector and 3. The AM/PM selector.

My code to select the values via .sendKeys(“desired value”) was working quite well - until I attempt to select 12:any minute PM while current time is 11ish AM. Application under test does not permit giving it values in the past (you scroll it and it just scrolls right back to original value) - and it seems when sendKeys detects that current hour mark is 11 and desired target is 12 - instead of going forward by 1 it attempts to go back by 11 and application under test just reverts the value.

I attempted to bypass this by interacting with the AM/PM wheel instead - but that doesn’t seem to help - when I try to change the hour mark - it once again reverts back to 11ish AM.

So… any way to work around this? Otherwise I’ll be forced to avoid working with date-ranges that include today.

how you set needed time manually?

By scrolling from 11 to 12 on the first wheel. Just small flick down. AM switches to PM in 3rd wheel automatically when I do that.

so why not make same in code while sendKeys fails to set 12?

Ok, I’ll see if I can make gestures work here I guess.

try → Slow - AppiumselectPickerWheelIOS

Worked like a charm with offset of 0.1

Thank you!

yes. a bit slow solution but close to your manual steps.