开发者

Posting an Intent from Python scripts using Monkey/Monkey Runner

I am trying to test my apps using python and monkey runner. I want to send an intent during start activity. I tried using extras and this doesnt help.

Can some one help me with this? If possible can some one provide me a sample AndroidManifest.xml and test.py on how to do this.

Thank开发者_JAVA技巧 you all for the help blr p sh


There are some bugs in monkeyrunner avoiding correct handling of extras. This question also mentions the case passing booleans, but it's not restricted to them.

The workaround, as monkeyrunner does not do much that invoking ADB in this cases is to use

device.shell('am start -a android.intent.action.MAIN -n my.pkg/.MyActivity -e key val')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜