码迷,mamicode.com
首页 > Windows程序 > 详细

uiautomator api

时间:2016-03-29 23:51:05      阅读:308      评论:0      收藏:0      [点我收藏+]

标签:

System.out.println( this.getUiDevice().isNaturalOrientation());  //是否竖屏
this.getUiDevice().setOrientationLeft();
System.out.println( this.getUiDevice().isNaturalOrientation());
System.out.println( this.getUiDevice().getDisplayRotation());  //显示角度  
 
this.getUiDevice().pressKeyCode(1); 键盘按键
 
          Point s=new Point();
          Point s1=new Point();
          Point[] t={s,s1};        
          this.swipe(t, 13);
 ShellUtil.exec("input swipe 500 1400 500 700 500");
 
 
new UiObject(new UiSelector().resourceId(sp.UrlAddress)).pinchOut(50, 20);

performMultiPointGesture(PointerCoords.touches)

 

UiScrollable aa=new UiScrollable(new UiSelector().resourceId("com.android.browser:id/title"));
     aa.flingBackward();
     aa.flingForward();      
     aa.scrollToEnd(10);
     aa.scrollIntoView(uiobject);
 
 
jar:

clickAndWaitForNewWindow()

Exists()

 

ShellUtil.sendRecoverTime();
ShellUtil.sendWifiRebind("Inweb1","inweb1test");    
 
System.out.println("IMEI:" + ShellUtil.getImei());
System.out.println("TIME:" + ShellUtil.exec("date"));
ShellUtil.sendTime(2015,12,22,20,20,20,false);
Runtime.getRuntime().exec("getprop |grep time");
Runtime.getRuntime().exec("pm list packages -u -3");
ShellUtil.exec("chmod 777 /data/data");
ShellUtil.exec("su");
ShellUtil.exec("cp /data/data/com.android.browser/databases/UsageStats.db /sdcard");
Shell.execs("ps |grep com.meizu.mstore");
ShellUtil.exec("kill 19420");
 
exec("ime set com.android.adbkeyboard/.AdbIME");
exec("ime set com.baidu.input_mz/com.meizu.input.MzInputService");
input text "File:///"
 

Element list = this.findElement(By.byId(PAGE_LIST));

list.toVerticalList().searchBy(By.byId(LIST_ELEMENT).child(By.byId(INSTALL_BUTTON).text("安装")), a, 100000)
 
findElement(PubPageImpl.SEARCH_HOT).findElement( By.byClassName("android.widget.Button").instance(instance)).getText();
findElement(By.byText(switchText)).toRight(By.byId(PubPageImpl.SWITCH)).isChecked();
 
 
 
 

 

 
 
 
 

uiautomator api

标签:

原文地址:http://www.cnblogs.com/season-xie/p/5335106.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!