I am using appium 1.2.0; Mac OS 10.8.5 and iPhone 5S with iOS 7.1.2.
Now for some reason I am not able to automate UIPickerWheel.
I have tried both means of sendKeys, i.e. sendKeys(“2”) and sendKeys(“2. 2 of 9”) but none of them works.
Here’s the log that I get correspondingly :
info: --> POST /wd/hub/session/6d69d366-845b-4de5-a899-7cc8429bd902/element {"using":"xpath","value":"//UIAApplication[1]/UIAWindow[1]/UIAPicker[1]/UIAPickerWheel[1]"}
debug: Appium request initiated at /wd/hub/session/6d69d366-845b-4de5-a899-7cc8429bd902/element
debug: Request received with params: {"using":"xpath","value":"//UIAApplication[1]/UIAWindow[1]/UIAPicker[1]/UIAPickerWheel[1]"}
debug: Pushing command to appium work queue: "au.mainApp().getTreeForXML()"
debug: Sending command to instruments: au.mainApp().getTreeForXML()
debug: Sending command to instruments: au.mainApp().getTreeForXML()
debug: [INST] 2014-08-31 10:09:52 +0000 Debug: Got new command 24 from instruments: au.mainApp().getTreeForXML()
debug: [INST] 2014-08-31 10:09:52 +0000 Debug: evaluating au.mainApp().getTreeForXML()
debug: [INST] 2014-08-31 10:09:53 +0000 Debug: evaluation finished
debug: [INST] 2014-08-31 10:09:53 +0000 Debug: Result is not protocol compliant, wrapping
debug: [INST] 2014-08-31 10:09:53 +0000 Debug: Running system command #25: /usr/local/Cellar/node/0.10.29/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":{"UIAApplication":{"@":{"name":"xyz","label":"xyz","value":null,"dom":null,"enabled":true,"valid":true,"visible":t...
debug: Socket data received (8192 bytes)
debug: Socket data received (6661 bytes)
debug: Socket data being routed.
debug: Got result from instruments: {"status":0,"value":{"UIAApplication":{"@":{"name":"xyz","label":"xyz","value":null,"dom":null,"enabled":true,"valid":true,"visible":true,"hint":null,"path":"/0","x":0,"y":20,"width":320,"height":548},">":[{"UIAWindow":{"@":{"name":null,"label":null,"value":null,"dom":null,"enabled":true
debug: Pushing command to appium work queue: "au.getElementByIndexPath('/0/0/28/0')"
debug: Sending command to instruments: au.getElementByIndexPath('/0/0/28/0')
debug: Sending command to instruments: au.getElementByIndexPath('/0/0/28/0')
debug: [INST] 2014-08-31 10:09:54 +0000 Debug: Got new command 25 from instruments: au.getElementByIndexPath('/0/0/28/0')
debug: [INST] 2014-08-31 10:09:54 +0000 Debug: evaluating au.getElementByIndexPath('/0/0/28/0')
debug: [INST] 2014-08-31 10:09:54 +0000 Debug: evaluation finished
debug: [INST] 2014-08-31 10:09:54 +0000 Debug: Running system command #26: /usr/local/Cellar/node/0.10.29/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":{"ELEMENT":"6"}}...
debug: Socket data received (38 bytes)
debug: Socket data being routed.
debug: Got result from instruments: {"status":0,"value":{"ELEMENT":"6"}}
debug: Responding to client with success: {"status":0,"value":{"ELEMENT":"6"},"sessionId":"6d69d366-845b-4de5-a899-7cc8429bd902"}
info: <-- POST /wd/hub/session/6d69d366-845b-4de5-a899-7cc8429bd902/element 200 2717.696 ms - 87 {"status":0,"value":{"ELEMENT":"6"},"sessionId":"6d69d366-845b-4de5-a899-7cc8429bd902"}
info: --> POST /wd/hub/session/6d69d366-845b-4de5-a899-7cc8429bd902/element/6/value {"id":"6","value":["2. 2 of 9"]}
debug: Appium request initiated at /wd/hub/session/6d69d366-845b-4de5-a899-7cc8429bd902/element/6/value
debug: Request received with params: {"id":"6","value":["2. 2 of 9"]}
debug: Pushing command to appium work queue: "au.getElement('6').setValueByType('2. 2 of 9')"
debug: Sending command to instruments: au.getElement('6').setValueByType('2. 2 of 9')
debug: Sending command to instruments: au.getElement('6').setValueByType('2. 2 of 9')
debug: [INST] 2014-08-31 10:09:55 +0000 Debug: Got new command 26 from instruments: au.getElement('6').setValueByType('2. 2 of 9')
debug: [INST] 2014-08-31 10:09:55 +0000 Debug: evaluating au.getElement('6').setValueByType('2. 2 of 9')
debug: [INST] 2014-08-31 10:09:55 +0000 Debug: - selectValue requires a valid value
debug: Socket data received (62 bytes)
debug: Socket data being routed.
debug: Got result from instruments: {"status":17,"value":"- selectValue requires a valid value"}
debug: Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"- selectValue requires a valid value"},"sessionId":"6d69d366-845b-4de5-a899-7cc8429bd902"}
info: <-- POST /wd/hub/session/6d69d366-845b-4de5-a899-7cc8429bd902/element/6/value 500 1126.228 ms - 197
I get the same error when trying with sendKeys(“2”).
Any help? Stuck on this problem for past 48 hours!