calabash-android: click on image by name

I’m not really sure what you mean by ‘has only name’, but if there is no other way to locate the image view, you could use the index.

To find the index,
query "* ImageView" and see which one matches.

Then you can interact with it like so:

tap "ImageView index:0" #or whatever index

Note: If it was actually ID’d somehow (e.g. had a ContentDescription), you could do

tap "ImageView marked:'<whatever ID>'"

Leave a Comment