Rilwan
Rilwan

Reputation: 2301

How to find out real co-ordinates of a view using Android viewClient in Monkeyrunner?

Finding (x,y) cordinates of a text in the android UI using dtmilano Android vieClient in Monkeyrunner.

i am getting only relative cordinates using below code:-

vc = ViewClient(devid,deviceid)
dump=vc.dump()
peer_pos = vc.findViewWithAttribute('text:mText',peer_name)
x, y) = peer_pos.getXY()

The (x,y) returning is not correct always.How to find out the real coordinates.somebody please help.

Upvotes: 0

Views: 511

Answers (1)

n8schloss
n8schloss

Reputation: 2781

Have you looked at the guide here? It provides an introduction to using ViewClient with MonkeyRunner and might be helpful.

Upvotes: 1

Related Questions