facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.35k forks source link

what is the correct value for element in JS for XCUIElementTypePickerWheel #1079

Open LayMuiToh opened 5 years ago

LayMuiToh commented 5 years ago

I am using webdriverio v.4.14.1, appium is v.1.10 I give the picker UI element a accessiblityLabel "Picker" however, it didn't respond and give a error, my code snippet: browser.execute('mobile: selectPickerWheelValue', { element: MoreFilters.picker.value.ELEMENT, order: 'next', offset: 0.5});

An unknown server-side error occurred while processing the command. Original error: The element is expected to be a valid Picker Wheel control. 'XCUIElementTypeOther' was given instead

reference to http://appium.io/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures/index.html#mobile-selectPickerWheelValue

LayMuiToh commented 5 years ago

from appium.log:

^[[35m[HTTP]^[[39m ^[[37m-->^[[39m ^[[37mPOST^[[39m ^[[37m/wd/hub/session/71d4b953-70aa-4922-bd33-7685c93fec84/execute^[[39m
^[[35m[HTTP]^[[39m ^[[90m{"script":"mobile: selectPickerWheelValue","args":[{"element":"3F010000-0000-0000-32AF-000000000000","order":"next","offset":0.5}]}^[[39m
[debug] ^[[35m[MJSONWP (71d4b953)]^[[39m Calling AppiumDriver.execute() with args: ["mobile: selectPickerWheelValue",[{"element":"3F010000-0000-0000-32AF-000000000000","order":"next","offset":0.5}],"71d4b953-70aa-4922-bd33-7685c93fec84"]
[debug] ^[[35m[XCUITest]^[[39m Executing command 'execute'
^[[35m[XCUITest]^[[39m Proxying to WDA with an unknown route: POST /wda/pickerwheel/3F010000-0000-0000-32AF-000000000000/select
[debug] ^[[35m[JSONWP Proxy]^[[39m Proxying [POST /wda/pickerwheel/3F010000-0000-0000-32AF-000000000000/select] to [POST http://localhost:8100/session/E17CC85B-8C89-4B65-A65A-A643AA6DBC47/wda/pickerwheel/3F010000-0000-0000-32AF-000000000000/select] with body: {"order":"next","offset":0.5}
[debug] ^[[35m[JSONWP Proxy]^[[39m Got response with status 200: {"value":"The element is expected to be a valid Picker Wheel control. 'XCUIElementTypeOther' was given instead","sessionId":"E17CC85B-8C89-4B65-A65A-A643AA6DBC47","status":13}
^[[35m[JSONWP Proxy]^[[39m Got an unexpected response: {"value":"The element is expected to be a valid Picker Wheel control. 'XCUIElementTypeOther' was given instead","sessionId":"E17CC85B-8C89-4B65-A65A-A643AA6DBC47","status":13}
[debug] ^[[35m[MJSONWP]^[[39m Matched JSONWP error code 13 to UnknownError
[debug] ^[[35m[MJSONWP (71d4b953)]^[[39m Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: The element is expected to be a valid Picker Wheel control. 'XCUIElementTypeOther' was given instead