Monkeyrunner 常用按键代码

老虎说测试 大话测试字数 580阅读1分56秒阅读模式
摘要Monkeyrunner 常用按键代码

Monkeyrunner 常用按键代码

Monkeyrunner 常用按键代码:文章源自陈学虎-https://chenxuehu.com/article/2017/05/6411.html

Home键:KEYCOD_HOME 
Back键:KEYCODE_BACK 
send键:KEYCODE_CALL 
end键:KEYCODE_ENDCALL  
ok键:KEYCODE_DPAD_CENTER 
上音量键:KEYCODE_VOLUME_UP  
下音量键:KEYCODE_VOLUME_DOWN 
power键:KEYCODE_POWER
camera键:KEYCODE_CAMERA 
menu键:KEYCODE_MENU 
search键:KEYCODE_SEARCH
call键:KEYCODE_CALL 

使用示例:

按下HOME键 device.press('KEYCODE_HOME',MonkeyDevice.DOWN_AND_UP)  
按下BACK键 device.press('KEYCODE_BACK',MonkeyDevice.DOWN_AND_UP)  
按下下导航键 device.press('KEYCODE_DPAD_DOWN',MonkeyDevice.DOWN_AND_UP)  
按下上导航键 device.press('KEYCODE_DPAD_UP',MonkeyDevice.DOWN_AND_UP)  
按下OK键 device.press('KEYCODE_DPAD_CENTER',MonkeyDevice.DOWN_AND_UP) 

 文章源自陈学虎-https://chenxuehu.com/article/2017/05/6411.html

 文章源自陈学虎-https://chenxuehu.com/article/2017/05/6411.html

 文章源自陈学虎-https://chenxuehu.com/article/2017/05/6411.html 文章源自陈学虎-https://chenxuehu.com/article/2017/05/6411.html

 最后更新:2017-8-14
  • 版权声明:本文为原创文章,转载请附上原文出处链接及本声明。
  • 转载请注明:Monkeyrunner 常用按键代码 | https://chenxuehu.com/article/2017/05/6411.html