Select values in datepicker when XCUIElementTypePickerWheel is not available in UI

I am unable to scroll on datepicker, I have tried several options. Looking for the solution.

  • Tried to swipe using below code. no success
    // swipe up then down
    Map<String, Object> args = new HashMap<>();
    args.put(“direction”, “up”);
    driver.executeScript(“mobile: swipe”, args);
    args.put(“direction”, “down”);
    driver.executeScript(“mobile: swipe”, args);

  • Tried appium touchaction class but there is no success in that as well
    TouchAction touchAction = new TouchAction(driver);
    touchAction.press(PointOption.point(95, -10210)).waitAction(WaitOptions.waitOptions(Duration.ofSeconds(1))).moveTo(PointOption.point(95, -10210)).release().perform();

try -> http://appium.io/docs/en/writing-running-appium/tutorial/swipe-tutorial/ -> iOS: ‘pickerWheels’ swipe

1 Like