??python????????????Monkeyrunner???????????
???????????? ???????[ 2014/1/8 15:06:48 ] ????????python ???? ???????
????Monkeyrunner?Andriod SDK ?????????????????????????????Andriod???????????????????????????????????????????????з????????
????Monkeyrunner??????google??????к??????????????????????????????????????????????????
????1. ???button???????????????????????λ????????????????????Ч???
???????????a?? ???device.getProperty("display.width")??device.getProperty("display.height")?????????????????????μ?????У??????2???????????????????????????????X??Y?????
???????????b?????view server???ID????λ?????????????????????????????????view server?????????????rooted??????????hierarchyviewer.bat?????view server???????. ???????е?????????????ο?????????????????http://blog.apkudo.com/tag/viewserver/
from com.android.chimpchat.hierarchyviewer import HierarchyViewer
from com.android.monkeyrunner.easy import By
from com.android.hierarchyviewerlib.device import ViewNode
easy_device.locate(By.id('id/main_button'))
easy_device.touch(By.id('id/main_button')?? 'downAndUp')
????2. ???????????У??????????????????
?????????????????????У?????????????app???????????????????????????????????????????????????????????????????
???????????a?????OCR????????????????????????python??????https://code.google.com/p/pytesser/??????????cpython???monkeyrunner?????jython?? ?????????cpython????飬OCR????java?????????jython??????java???????
???????????b:?? ?????view server?????????????
hierarchy_viewer = device.getHierarchyViewer()
view_node = hierarchy_viewer.findViewById('id/prompt_text_view')
text = view_node.namedProperties.get('mText').toString()
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11