appium desktop 1.7 的swipe功能不能用,重写。

rt

//	@Override
	public void swipe(int startx,int starty,int endx,int endy,int ms){
		Duration duration=Duration.ofSeconds(ms/1000);

		TouchAction tAction = 
		new TouchAction(this).press(startx,starty).waitAction(ms)
		.moveTo(endx,endy).waitAction(ms/100).release();
		try{
			tAction.perform();
		}catch(Exception e){
			System.out.println("An unkown server-side error");
			Reporter.log(" An unknown server-side error occurred while processing the command.");
			e.printStackTrace();
		}
	}

  

posted @ 2018-06-11 13:41  头鹰在学习  阅读(197)  评论(0编辑  收藏  举报