Calabash -Android: Can we simulate Home button on Android devices for Calabash-Android?

巧了我就是萌 提交于 2019-12-06 12:27:55
Lasse

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

Link http://krazyrobot.com/2014/02/calabash-android-enter-text-from-keyboard-using-adb/ by Balazs Balazs aka krazyrobot

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

system("adb shell input keyevent KEYCODE_HOME")

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

Additionally, the

system("adb shell input keyevent KEYCODE_BACK")

works if you just want to go back a screen.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!