I checked the page source. Co-ordinate bounds of my element in page source are-
[232,540][354,652].
but
Appium server’s response is
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.Image[@content-desc=‘apparels’]",“context”:"",“multiple”:false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“xpath”,“selector”:"//android.widget.Image[@content-desc=‘apparels’]",“context”:"",“multiple”:false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding ‘//android.widget.Image[@content-desc=‘apparels’]’ using ‘XPATH’ with the contextId: ‘’ multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[CLASS=android.widget.Image, INSTANCE=5]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“7”}}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElement() result: {“ELEMENT”:“7”}
[HTTP] <-- POST /wd/hub/session/867c0716-1211-442a-8f70-8911cebf04fb/element 200 435 ms - 87
[HTTP] --> POST /wd/hub/session/867c0716-1211-442a-8f70-8911cebf04fb/touch/perform {“actions”:[{“action”:“tap”,“options”:{“element”:“7”}}]}
[MJSONWP] Calling AppiumDriver.performTouch() with args: [[{“action”:“tap”,“options”:{“element”:“7”}}],“867c0716-1211-442a-8f70-8911cebf04fb”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“element:getLocation”,“params”:{“elementId”:“7”}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“element:getLocation”,“params”:{“elementId”:“7”}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getLocation
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“x”:232,“y”:414}}
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“element:getSize”,“params”:{“elementId”:“7”}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“element:getSize”,“params”:{“elementId”:“7”}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getSize
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:{“width”:122,“height”:8}}
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“7”,“x”:293,“y”:418}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“7”,“x”:293,“y”:418}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: click
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:true}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.performTouch() result: null.
As you can see it is taking co-ordinate 293,418.
Now 418 that is y- co-ordinate is not within the bounds of my element which is-[232,540][354,652]
Which makes me confused that why is it taking the wrong y co-ordinate sometimes!