hi, all
i want to write a java program like monkey to test my activity.
like below, i can make a click at the coordinate, but i can not know the
button's coordinate which i want to click.
WindowManager windowManager =
IWindowManager.Stub.asInterface(ServiceManager.getService("window"));
windowManager.injectPointerEvent(MotionEvent.obtain(SystemClock.uptimeMillis(),
SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN,
240, 400, 0), true);
windowManager.injectPointerEvent(MotionEvent.obtain(SystemClock.uptimeMillis(),
SystemClock.uptimeMillis(), MotionEvent.ACTION_UP,
240, 400, 0), true);
so, i wonder if i can get the current activity window, then i can use
findViewById to get the button, but how?
thanks~
--
Bear ^O^
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en