Tuesday, February 11, 2014

Why monkeyrunner by idtouch response so slow? What optimization method?


 
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from com.android.monkeyrunner.easy import EasyMonkeyDevice
from com.android.monkeyrunner.easy import By
from com.android.chimpchat.hierarchyviewer import HierarchyViewer
from com.android.hierarchyviewerlib.device import ViewNode
device = MonkeyRunner.waitForConnection ()
device.startActivity (component = 'com.android.camera / .Camera')
MonkeyRunner.sleep (3.0)
easy_device = EasyMonkeyDevice (device) # init easymonkeydevice object must start activity at first.Because the init method
easy_device.touch (By.id ('id / second_level_indicator_bar_icon'), MonkeyDevice.DOWN_AND_UP)
print By.id ('id / second_level_indicator_bar_icon')

Reply:
Own posts their top ......
Reply:
Still no answer I ah ......
Reply:
Seems to point to traverse the controls before, if the page complicated, the efficiency is very low it!
Reply:
Advance through hierarchyviewer traversing view the id, into python dictionary inside.

No comments:

Post a Comment