/**
* 通过手势操作打开通知栏
* @throws UiObjectNotFoundException
*/
public void testViewNotification() throws UiObjectNotFoundException{
device.pressHome();
device.swipe(300, 0, 300, 800, 50);
device.waitForIdle(2000);
device.pressBack();
}
通过UiDevice中的swipe方法,模拟滑动操作,从状态栏上面下滑, 方法是UiDevice.swipe(startX,startY,endX,endY,steps)
也可通过androidSDK,直接调用swipe方法