Hi Jonathan,
(Im using - Appium + Webdriver +Java+IOS 7) driver.findElement(By.xpath(" //window[1]/picker[1]/pickerwheel[1]").sendKeys("1. 1 of 6");
While getAttribure returns the correct attribute but while sending that attribute as keys it throws error
But it fails with this errorReturning By locator: By.xpath:
//window[1]/picker[1]/pickerwheel[1] [
[ INFO] [main] TC-1234613:
==================== Test Method::1::verifyFlightsSearch tcid=1234613 Failed at 25-03-2014 00:02:25 [Elapsed Time = 03:10] ==================== [runTestListeners::Invoker.java:1883]
[ERROR] [main] TC-1234613:
org.openqa.selenium.WebDriverException: An error occurred while executing user supplied JavaScript. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 162 milliseconds
Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
System info:
os.name:
'Mac OS X', os.arch: 'x86_64', os.version: '10.9.1', java.version: '1.7.0_51'Though Appium logs looks fine: Pushing command to appium work queue: "au.getElementByXpath('\\/\\/window[1]\\/picker[1]\\/pickerwheel[1]')"
debug: Request received with params: {"using":"xpath","value":"//window[1]/picker[1]/pickerwheel[1]"}
debug: Sending command to instruments: au.getElementByXpath('\/\/window[1]\/picker[1]\/pickerwheel[1]')
info: [INSTSERVER] Sending command to instruments: au.getElementByXpath('\/\/window[1]\/picker[1]\/pickerwheel[1]')
info: [INSTSERVER] Socket data received (61 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":{"ELEMENT":"5"}}
info: Responding to client with success: {"status":0,"value":{"ELEMENT":"5"},"sessionId":"ca8d53f8-74ba-4cf2-a2d7-e8482fe48335"}
POST /wd/hub/session/ca8d53f8-74ba-4cf2-a2d7-e8482fe48335/element 200 170ms - 109b
debug: Appium request initiated at /wd/hub/session/ca8d53f8-74ba-4cf2-a2d7-e8482fe48335/element/5/attribute/value
info: Pushing command to appium work queue: "au.getElement('5').value()"
debug: Request received with params: {}
debug: Sending command to instruments: au.getElement('5').value()
info: [INSTSERVER] Sending command to instruments: au.getElement('5').value()
info: [INSTSERVER] Socket data received (57 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {
"status":0,"value":"1. 1 of 6"}info: Responding to client with success: {"status":0,"value":"1. 1 of 6","sessionId":"ca8d53f8-74ba-4cf2-a2d7-e8482fe48335"}
GET /wd/hub/session/ca8d53f8-74ba-4cf2-a2d7-e8482fe48335/element/5/attribute/value 200 146ms - 96b
What is wrong, please suggest.
Thanks,
Pooja