Search code examples
androidtouchcalabashcalabash-android

Calabash-android: Inaccurate touch when trying to touch elements on pop-up window


I’m facing an issue with touching on elements.

The issue occur when a pop-up window appears and when I’m pressing on one of the buttons nothing happen.

  • The query recognize the element.
  • This issue occur on physical device only (never saw that issue on the Genymotion).
  • It is not always happening.
  • After playing around (queries, touches, etc.) it is works fine, but happen again if I re-open the app.
  • Trying to touch it by ‘* text’ or ‘* id’ and got the same results.
  • Configure the device to show the touches and it is showing a wrong position when pressing.

Is that a known issue with Calabash?

Your thoughts?


Solution

  • To me, it sounds like a known issue with Android, which is seen in Calabash-Android when working with floating dialogues and keyboards (which is why the issue probably does not occur when using Genymotion). We have described workarounds in greater detail here in the Calabash-Android wiki. What happens is that the view coordinates of the floating dialogue are not updated when they keyboard is shown/hidden and visually pushes the dialogue upwards and downwards.