ios - Appium Error: start point is not within the bounds of the screen -


i'm trying run automated tests of web app on ios using appium (via saucelabs) , getting problem relatively simple test case detailed below.

i following error in appium log:

info: [instserver] got result instruments: {"status":17,"value":"start point not within bounds of screen"} 2014-05-29t17:21:01.282z - info: responding client error: {"status":17,"value":{"message":"an error occurred while executing user supplied javascript.","origvalue":"start point not within bounds of screen"},"sessionid":"47322525-37e0-4f4b-a236-224906d0135c"} 

looking @ screenshots, element in question appear on screen.

i've tried scrolling element before attempting click using:

((ijavascriptexecutor)driver).executescript("arguments[0].scrollintoview();", driver.findelement(by.id(elementid))); 

and scrolling via javascript doesn't appear make difference. seems set of coordinates getting messed up, don't know enough how appium works figure out.

the test

i have created jsfiddle here (view-only here) tests point at. has set of fields laid out down page.

i'm setting web driver capabilities this:

desiredcapabilities caps = desiredcapabilities.ipad(); caps.setcapability(capabilitytype.platform, "os x 10.9"); caps.setcapability(capabilitytype.version, "7"); caps.setcapability("device-orientation", "portrait"); caps.setcapability("nonsyntheticwebclick", "false");  

the webdriver test (written in c#) looks like:

    [test]     public void testsequence()     {         string sequence = "button4,button3,button2";         var fieldids = sequence.split(',');         foreach (var fieldid in fieldids)         {             console.write("{0},", fieldid);             if (fieldid[0] == 't')             {                 driver.findelement(by.id(fieldid)).sendkeys("1");             }             else             {                 driver.findelement(by.id(fieldid)).click();             }         }     } 

you can see takes 'sequence' of fields clicked. way of trying out different combinations.

to illustrate issue, following combinations fail:

text1,button1,text4,button3 text4,button3 button4,text3,button2 button4,button3,button2 

whereas these fine:

button1,button4,button1,button4,button1 button1,button2,button3,button4 

any gratefully appreciated.

(the log)

the (hopefully) relevant part of appium log here:

2014-05-29t17:48:32.074z - debug: appium request initiated @ /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element 2014-05-29t17:48:32.074z - debug: request received params: {"using":"id","value":"button4"} 2014-05-29t17:48:32.075z - info: [remote] executing 'find_element' atom in default context 2014-05-29t17:48:32.076z - info: [remote] sending javascript command 2014-05-29t17:48:32.076z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:32.084z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:32.084z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:32.085z - info: responding client success: {"status":0,"value":{"element":"5000"},"sessionid":"fc441e9f-8ade-4799-8f87-1653a50a5a49"} post /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element 200 11ms - 112b 2014-05-29t17:48:32.687z - debug: appium request initiated @ /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element/5000/click 2014-05-29t17:48:32.687z - debug: request received params: {} 2014-05-29t17:48:32.688z - info: [remote] executing 'get_top_left_coordinates' atom in default context 2014-05-29t17:48:32.688z - info: [remote] sending javascript command 2014-05-29t17:48:32.689z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:32.712z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:32.712z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:32.712z - info: [remote] executing 'get_size' atom in default context 2014-05-29t17:48:32.713z - info: [remote] sending javascript command 2014-05-29t17:48:32.713z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:32.731z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:32.731z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:32.732z - info: pushing command appium work queue: "au.getelementsbytype('webview')" 2014-05-29t17:48:32.732z - debug: sending command instruments: au.getelementsbytype('webview') info: [instserver] sending command instruments: au.getelementsbytype('webview') info: [instserver] socket data received (63 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":[{"element":"1"}]} 2014-05-29t17:48:32.879z - info: pushing command appium work queue: "au.getelement('1').rect()" 2014-05-29t17:48:32.879z - info: [remote] sending javascript command 2014-05-29t17:48:32.879z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:32.879z - debug: sending command instruments: au.getelement('1').rect() info: [instserver] sending command instruments: au.getelement('1').rect() 2014-05-29t17:48:32.880z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:32.880z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:32.881z - debug: [remote] got applicationsentdata response info: [instserver] socket data received (108 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":{"origin":{"x":0,"y":-423},"size":{"width":768,"height":1467}}} 2014-05-29t17:48:32.987z - info: converted web coords {"x":351,"y":734}into real coords {"x":275.069387755102,"y":132.2019230769231} 2014-05-29t17:48:32.987z - info: pushing command appium work queue: "au.complextap({\"x\":275.069387755102,\"y\":132.2019230769231,\"tapcount\":1,\"duration\":0.3,\"touchcount\":1})" 2014-05-29t17:48:32.987z - debug: sending command instruments: au.complextap({"x":275.069387755102,"y":132.2019230769231,"tapcount":1,"duration":0.3,"touchcount":1}) info: [instserver] sending command instruments: au.complextap({"x":275.069387755102,"y":132.2019230769231,"tapcount":1,"duration":0.3,"touchcount":1}) info: [instserver] socket data received (48 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":""} 2014-05-29t17:48:34.002z - info: responding client success: {"status":0,"value":"","sessionid":"fc441e9f-8ade-4799-8f87-1653a50a5a49"} post /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element/5000/click 200 1317ms - 87b 2014-05-29t17:48:34.737z - debug: appium request initiated @ /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element 2014-05-29t17:48:34.737z - debug: request received params: {"using":"id","value":"button3"} 2014-05-29t17:48:34.738z - info: [remote] executing 'find_element' atom in default context 2014-05-29t17:48:34.738z - info: [remote] sending javascript command 2014-05-29t17:48:34.738z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:34.748z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:34.749z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:34.749z - info: responding client success: {"status":0,"value":{"element":"5001"},"sessionid":"fc441e9f-8ade-4799-8f87-1653a50a5a49"} post /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element 200 14ms - 112b 2014-05-29t17:48:35.352z - debug: appium request initiated @ /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element/5001/click 2014-05-29t17:48:35.352z - debug: request received params: {} 2014-05-29t17:48:35.352z - info: [remote] executing 'get_top_left_coordinates' atom in default context 2014-05-29t17:48:35.353z - info: [remote] sending javascript command 2014-05-29t17:48:35.353z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:35.364z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:35.364z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:35.365z - info: [remote] executing 'get_size' atom in default context 2014-05-29t17:48:35.365z - info: [remote] sending javascript command 2014-05-29t17:48:35.365z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:35.377z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:35.378z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:35.378z - info: pushing command appium work queue: "au.getelementsbytype('webview')" 2014-05-29t17:48:35.378z - debug: sending command instruments: au.getelementsbytype('webview') info: [instserver] sending command instruments: au.getelementsbytype('webview') info: [instserver] socket data received (63 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":[{"element":"2"}]} 2014-05-29t17:48:35.544z - info: pushing command appium work queue: "au.getelement('2').rect()" 2014-05-29t17:48:35.544z - info: [remote] sending javascript command 2014-05-29t17:48:35.545z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:35.545z - debug: sending command instruments: au.getelement('2').rect() info: [instserver] sending command instruments: au.getelement('2').rect() 2014-05-29t17:48:35.547z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:35.547z - debug: [remote] got applicationsentdata response info: [instserver] socket data received (110 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":{"origin":{"x":0,"y":-137.5},"size":{"width":768,"height":1467}}} 2014-05-29t17:48:35.651z - info: converted web coords {"x":351,"y":629}into real coords {"x":275.069387755102,"y":335.4182692307692} 2014-05-29t17:48:35.651z - info: pushing command appium work queue: "au.complextap({\"x\":275.069387755102,\"y\":335.4182692307692,\"tapcount\":1,\"duration\":0.3,\"touchcount\":1})" 2014-05-29t17:48:35.651z - debug: sending command instruments: au.complextap({"x":275.069387755102,"y":335.4182692307692,"tapcount":1,"duration":0.3,"touchcount":1}) info: [instserver] sending command instruments: au.complextap({"x":275.069387755102,"y":335.4182692307692,"tapcount":1,"duration":0.3,"touchcount":1}) info: [instserver] socket data received (48 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":""} 2014-05-29t17:48:36.634z - info: responding client success: {"status":0,"value":"","sessionid":"fc441e9f-8ade-4799-8f87-1653a50a5a49"} post /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element/5001/click 200 1282ms - 87b 2014-05-29t17:48:37.337z - debug: appium request initiated @ /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element 2014-05-29t17:48:37.337z - debug: request received params: {"using":"id","value":"button2"} 2014-05-29t17:48:37.337z - info: [remote] executing 'find_element' atom in default context 2014-05-29t17:48:37.337z - info: [remote] sending javascript command 2014-05-29t17:48:37.337z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:37.355z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:37.355z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:37.355z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:37.356z - info: responding client success: {"status":0,"value":{"element":"5002"},"sessionid":"fc441e9f-8ade-4799-8f87-1653a50a5a49"} post /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element 200 20ms - 112b 2014-05-29t17:48:37.952z - debug: appium request initiated @ /wd/hub/session/fc441e9f-8ade-4799-8f87-1653a50a5a49/element/5002/click 2014-05-29t17:48:37.952z - debug: request received params: {} 2014-05-29t17:48:37.952z - info: [remote] executing 'get_top_left_coordinates' atom in default context 2014-05-29t17:48:37.952z - info: [remote] sending javascript command 2014-05-29t17:48:37.953z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:37.965z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:37.965z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:37.966z - info: [remote] executing 'get_size' atom in default context 2014-05-29t17:48:37.966z - info: [remote] sending javascript command 2014-05-29t17:48:37.967z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:37.977z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:37.977z - debug: [remote] got applicationsentdata response 2014-05-29t17:48:37.977z - info: pushing command appium work queue: "au.getelementsbytype('webview')" 2014-05-29t17:48:37.977z - debug: sending command instruments: au.getelementsbytype('webview') info: [instserver] sending command instruments: au.getelementsbytype('webview') info: [instserver] socket data received (63 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":[{"element":"3"}]} 2014-05-29t17:48:38.132z - info: pushing command appium work queue: "au.getelement('3').rect()" 2014-05-29t17:48:38.132z - info: [remote] sending javascript command 2014-05-29t17:48:38.132z - debug: [remote] sending _rpc_forwardsocketdata: message remote debugger 2014-05-29t17:48:38.133z - debug: sending command instruments: au.getelement('3').rect() info: [instserver] sending command instruments: au.getelement('3').rect() 2014-05-29t17:48:38.133z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:38.134z - debug: [remote] receiving data remote debugger 2014-05-29t17:48:38.134z - debug: [remote] got applicationsentdata response info: [instserver] socket data received (110 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":0,"value":{"origin":{"x":0,"y":-137.5},"size":{"width":768,"height":1467}}} 2014-05-29t17:48:38.243z - info: converted web coords {"x":351,"y":161}into real coords {"x":275.069387755102,"y":-31.331730769230774} 2014-05-29t17:48:38.243z - info: pushing command appium work queue: "au.complextap({\"x\":275.069387755102,\"y\":-31.331730769230774,\"tapcount\":1,\"duration\":0.3,\"touchcount\":1})" 2014-05-29t17:48:38.243z - debug: sending command instruments: au.complextap({"x":275.069387755102,"y":-31.331730769230774,"tapcount":1,"duration":0.3,"touchcount":1}) info: [instserver] sending command instruments: au.complextap({"x":275.069387755102,"y":-31.331730769230774,"tapcount":1,"duration":0.3,"touchcount":1}) info: [instserver] socket data received (99 bytes) info: [instserver] socket data being routed 'cmd' event info: [instserver] got result instruments: {"status":17,"value":"start point not within bounds of screen"} 2014-05-29t17:48:38.902z - info: responding client error: {"status":17,"value":{"message":"an error occurred while executing user supplied javascript.","origvalue":"start point not within bounds of screen"},"sessionid":"fc441e9f-8ade-4799-8f87-1653a50a5a49"} 

i can't recreate error, try updating appium v1.1 or 1.2. sauce labs defaults v0.18 right now.

you can change appium version on sauce labs adding following capability:

appium-version: '1.1'

also, used value instead of keys type input field. not sure translates in c#

i used javascript, here's working gist


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -