首页 > 其他 > 详细

uiautomator中InteractionController学习笔记(8)

时间:2014-04-20 03:56:57      阅读:736      评论:0      收藏:0      [点我收藏+]

4.1版本


InteractionController将用户的键盘事件注入到android系统中,与系统进行交互(电视为什么不能设计成可组装,屏幕多大自己决定,想 多大就多大)


click(int,int)


在某点点击。


clickAndWaitForNewWindow(int,int,long)


点击某点,得带界面信息变化


freezeRotation()/unFreezeRotation()/isNaturalRotation()/setRotationLeft()/setRotationNatural()/setRotationRight()


这些方法在UiDevice里同样存在,名称也是一样的,不再解释,可以返回UiDevice参考。


getSystemLongPressTime()


通过ContentProvider从系统中获得长安时间


injectEventSync(InputEvent)


将用户的输入时间注入到系统中


isScreenOn()


判断屏幕是后点亮


longTap(int,int)


长按某一点


scrollSwipe(int,int,int,int,int)


sendKey(int,int)


发送键盘事件


sentText(String)

发送字符串

sleepDevice()/wakeDevice()

如果屏幕是亮的,则按power键让屏幕休眠/与sleep相反

swipe(Point[],int)

与UiDevice相同

swipe(int,int,int,int,int)

与UiDevice相同

touchDown(int,int)/touchMove(int,int)/touchUp(int,int)

按下/拖动/抬起。


uiautomator中InteractionController学习笔记(8),布布扣,bubuko.com

uiautomator中InteractionController学习笔记(8)

原文:http://blog.csdn.net/itfootball/article/details/24149371

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!