@Override public boolean swipe(Selector obj,String dir,float percent,int steps) throws UiObjectNotFoundException {
  if (obj.toUiObject2() == null) {
    return swipe(device.findObject(obj.toUiSelector()),dir,steps);
  }
  return swipe(obj.toUiObject2(),dir,percent,steps);
}

@ Override public boolean swipe ( Selector obj , String dir , float percent , int steps ) throws UiObjectNotFoundException { if ( obj . toUiObject2 ( ) == null ) { return swipe ( device . findObject ( obj . toUiSelector ( ) ) , dir , steps ) ; } return swipe ( obj . toUiObject2 ( ) , dir , percent , steps ) ; }
performs the swipe up / down / left / right action on the uiobject
