swipe(Point[] segments, int segmentSteps)
实现的方法,从point数组中的第一个点滑动到第二个点,第二个点滑动到第三个点,依次滑动,形成一条条折线,每条直线所有步伐segmentSteps
例如:
package com.vv7;
import junit.framework.Assert;
import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.core.UiSelector;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
import android.graphics.Point;
import android.os.RemoteException;
public class UnlockCase extends UiAutomatorTestCase {
public void testUnlockCase() throws RemoteException,
UiObjectNotFoundException {
if (getUiDevice().isScreenOn()) {
getUiDevice().sleep();
}
getUiDevice().wakeUp();// 唤醒屏幕
// 向上滑动,调出图案解锁面板
getUiDevice().s