What is the correct way to touch a specific X,Y coordinate on screen using AndroidViewClient?
Asked
Active
Viewed 735 times
1 Answers
1
A simple way of discovering and learning AndroidViewClient is by using culebra
as a script generator.
Start culebra GUI as
culebra -uG --scale=0.5
click with the alternate button to open the context menu and select Touch using DIP or Touch using PX and the autogenerated script will contains something like
device.touchDip(139.33, 426.0, 0)
or
device.touch(250.0, 1242.0, 0)

Diego Torres Milano
- 65,697
- 9
- 111
- 134
-
Thanks dtmilano, I was hoping you'd be the one to notice this question; I've been making a lot of use of Culebra since you introduced it in a previous question on SO. Would you have any insight here? http://stackoverflow.com/questions/32102723/androidviewclient-restarts-device-with-every-command – tomtom Aug 20 '15 at 01:33
-
if I actually just run this verbatim as Culebra generates it, it will just restart my virtual device and then all further Culebra-generated scripts will do the same thing (just restart the device). That's related to the link in the above comment - have you ever encountered this? Right now I'm using a Google Galaxy Nexus 4.3 API 18 virtual device – tomtom Aug 20 '15 at 02:46
-
Try same scripts on emulator and you may be able to isolate the problem if it's strictly related to your device. – Diego Torres Milano Aug 20 '15 at 04:13