0

I am trying to select a value in picker wheel but every time I type [app.pickerWheels.adjustToPickerWheelValue[@"Test"]];
Xcode says

Property 'adjustToPickerWheelValue' not found on object of type 'XCUIElementQuery'

How to resolve this issue ?

Here is the link i followed till now Link

UIElement Tree enter image description here

Community
  • 1
  • 1
user3724559
  • 219
  • 1
  • 6
  • 20

1 Answers1

0

adjustToPickerWheelValue is a method on XCUIElement, but you are using it on an XCUIElementQuery.

To get an XCUIElement, you must specify which picker wheel you want (even if there is only one).

let pickerWheel = app.pickerWheels.elementBoundByIndex(0)
pickerWheel.adjustToPickerWheelValue("some value")
Oletha
  • 7,324
  • 1
  • 26
  • 46
  • Please also note that there are known issues with the adjustToPickerWheelValue method: https://forums.developer.apple.com/thread/16104 – Oletha Feb 02 '17 at 08:24