葫芦-Android:我们可以模拟对葫芦,Android的Andr​​oid设备Home键? [英] Calabash -Android: Can we simulate Home button on Android devices for Calabash-Android?

查看:200
本文介绍了葫芦-Android:我们可以模拟对葫芦,Android的Andr​​oid设备Home键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以模拟对葫芦,Android的Andr​​oid设备Home键?我需要在Home键轻按在我们的脚本中使用葫芦执行我的脚本。

Can we simulate Home button on Android devices for Calabash-Android? I need to tap on Home button in our scripts to execute my Scripts using Calabash.

推荐答案

我还没有试过这种没有自己。
但四处寻找一个解决方案我发现这一点。

I have not tried this yet myself. But looking around for a solution I did find this.

链接的http://krazyrobot.com/2014/02/calabash-android-enter-text-from-keyboard-using-adb/
由鲍拉日·巴拉兹又名 krazyrobot

他的解决方案是使用发送键codeS,为家庭按钮是关键code_HOME。
该包装成葫芦会给你:

His solution is to use send keycodes, for the home button that is KEYCODE_HOME. Wrapping that into calabash would give you:

系统(亚行外壳输入KEY的KeyEvent code_HOME)

我又没有尝试过这一点,但它听起来像一个解决方案。

Again I have not tried this, but it sounds like a solution.

这篇关于葫芦-Android:我们可以模拟对葫芦,Android的Andr​​oid设备Home键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆