MonkeyRunner:更可靠的等待和完整长度的屏幕截图?
我一直在和猴子跑者胡闹——抱歉不得不尝试讲那个笑话。
我试图实现三件事:
1)仅在我的应用程序完全启动并加载时发送按键点击。如何在不依赖不可靠的 MonkeyRunner.sleep(3)
的情况下做到这一点?
2)如果可能的话,如何捕获应用程序(可滚动)的完整长度的屏幕截图?
3)是否可以通过monkeyrunner将参数传递给我的应用程序,以便这些参数可以在应用程序中使用?
感谢大家的帮助
I've been monkeying around with the monkeyrunner - sorry had to try and tell that joke.
I am trying to achieve three things:
1) Only send key hits when my app has fully launched and loaded. How can I do this without relying on the unreliable MonkeyRunner.sleep(3)
?
2) How can I capture screenshots for the full length of my application (its scrollable), if at all possible?
3) Is it possible to pass parameters to my application via the monkeyrunner so that these parameters can be used within the application?
Thanks all for any help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将 python 的 subprocess 模块与 adb 的 logcat 一起使用来监视日志并查看应用程序何时打开。
如果您在真实设备上运行它,则这是不可能的。如果您正在使用模拟器进行操作,那么只需使模拟器屏幕与您需要的屏幕截图一样大即可。
是的,请参阅此处提供的选项。
You would need to use python's subprocess module with adb's logcat to monitor the log and see when your app opened.
If you are running this on a real device then it is not possible. If you are doing things with an emulator then just make it so the emulator screen is as big as you need the screen shot to be.
Yes, see the options that you have here.