0

I have a dialog comfirming ok or cancel, the view id of the button ok is found but the coordinates are wrong and the touch() does not work on the button ok. Culebra can click on the button ok but only using DIP or PX unit. But I would like to avoid using coordinates. So I try with the following codes and it works but is it a coincidence or is there really any relationship?

button_id = vc.findViewById('id/button1')
coord = button_id.getCenter()
device.touchDip(coord[0], coord[1])
NorthCat
  • 9,643
  • 16
  • 47
  • 50
  • Please provide more info like android version, device, AVC version, etc. – Diego Torres Milano Mar 27 '15 at 17:42
  • I test on standard adt android emulator and genymotion emulator, api 10. Both cases do not work, the coordinates are wrong. The method above does not work for genymotion emulator with different resolution, so it is probably a coincidence. By teh way there is another solution which sounds more natural, just using combination of press DPAD works fine in all cases. This issue with the dialog button is just a particular case in a particular application, so there is no need to investigate further. – tuan dat nguyen Mar 28 '15 at 14:26

0 Answers0