android 如何实现滑动【两次不一样路径】的手势密码?
代码如下:

//Enter pattern only once
一、 obj.press(topLeftX, topLeftY).moveTo(bottomLeftX-topLeftX, bottomLeftY-topLeftY).waitAction(2000)
.moveTo(bottomRightX-bottomLeftX, bottomRightY-bottomLeftY)
.waitAction(2000).release().perform();

String once_pattern=four_point.getText();
System.out.println(once_pattern);
Assert.assertEquals(once_pattern, "Please draw pattern again");
Thread.sleep(1000);

//Two patterns are drawn inconsistently
二、 obj.press(topLeftX, topLeftY).moveTo(bottomLeftX-topLeftX, bottomLeftY-topLeftY).waitAction(2000).release().perform();

明明写的两次滑动的结束位置不一样,但运行时发现只进行第【一】个滑动方式。且滑动两遍,第【二】次的不会执行,直接报错;
(若把第【二】处的代码注释掉,代码就会只滑动一遍)

请问这是什么原因,两处代码会影响吗?


↙↙↙阅读原文可查看相关链接,并与作者交流