def drag_to(self, target, duration=<NUM_LIT>):
try:<EOL><INDENT>duration = float(duration)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(repr(duration)))<EOL><DEDENT>if type(target) in (list, tuple):<EOL><INDENT>target_pos = target<EOL><DEDENT>else:<EOL><INDENT>target_pos = target.get_position()<EOL><DEDENT>origin_pos = self.get_position()<EOL>dir_ = [target_pos[<NUM_LIT:0>] - origin_pos[<NUM_LIT:0>], target_pos[<NUM_LIT:1>] - origin_pos[<NUM_LIT:1>]]<EOL>return self.swipe(dir_, duration=duration)<EOL>
Similar to swipe action, but the end point is provide by a UI proxy or by fixed coordinates.

Args:
    target (:py:class:`UIObjectProxy <poco.proxy.UIObjectProxy>`): a UI proxy or 2-list/2-tuple coordinates
     (x, y) in NormalizedCoordinate system
    duration (:py:obj:`float`): time interval in which the action is performed

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