def scroll(self, direction='vertical', percent=0.6, duration=2.0):
        """
        Simply touch down from point A and move to point B then release up finally. This action is performed within
        specific motion range and duration.

        Args:
            direction (:py:obj:`str`): scrolling direction. "vertical" or "horizontal"
            percent (:py:obj:`float`): scrolling distance percentage of selected UI height or width according to
             direction
            duration (:py:obj:`float`): time interval in which the action is performed

        Raises:
            PocoNoSuchNodeException: raised when the UI element does not exist
        """

        if direction not in ('vertical', 'horizontal'):
            raise ValueError('Argument `direction` should be one of "vertical" or "horizontal". Got {}'
                             .format(repr(direction)))

        focus1 = self._focus or [0.5, 0.5]
        focus2 = list(focus1)
        half_distance = percent / 2
        if direction == 'vertical':
            focus1[1] += half_distance
            focus2[1] -= half_distance
        else:
            focus1[0] += half_distance
            focus2[0] -= half_distance

        return self.focus(focus1).drag_to(self.focus(focus2), duration=duration)
def scroll ( self , direction = 'vertical' , percent = 0.6 , duration = 2.0 ) : if direction not in ( 'vertical' , 'horizontal' ) : raise ValueError ( 'Argument `direction` should be one of "vertical" or "horizontal". Got {}' . format ( repr ( direction ) ) ) focus1 = self . _focus or [ 0.5 , 0.5 ] focus2 = list ( focus1 ) half_distance = percent / 2 if direction == 'vertical' : focus1 [ 1 ] += half_distance focus2 [ 1 ] -= half_distance else : focus1 [ 0 ] += half_distance focus2 [ 0 ] -= half_distance return self . focus ( focus1 ) . drag_to ( self . focus ( focus2 ) , duration = duration )
Simply touch down from point A and move to point B then release up finally. This action is performed within
        specific motion range and duration.

        Args:
            direction (:py:obj:`str`): scrolling direction. "vertical" or "horizontal"
            percent (:py:obj:`float`): scrolling distance percentage of selected UI height or width according to
             direction
            duration (:py:obj:`float`): time interval in which the action is performed

        Raises:
            PocoNoSuchNodeException: raised when the UI element does not exist