MCPcopy Create free account
hub / github.com/e2b-dev/desktop / drag

Method drag

packages/python-sdk/e2b_desktop/main.py:489–499  ·  view source on GitHub ↗

Drag the mouse from the given position to the given position. :param from: The starting position. :param to: The ending position.

(self, fr: tuple[int, int], to: tuple[int, int])

Source from the content-addressed store, hash-verified

487 self.commands.run(f"xdotool key {key}")
488
489 def drag(self, fr: tuple[int, int], to: tuple[int, int]):
490 """
491 Drag the mouse from the given position to the given position.
492
493 :param from: The starting position.
494 :param to: The ending position.
495 """
496 self.move_mouse(fr[0], fr[1])
497 self.mouse_press()
498 self.move_mouse(to[0], to[1])
499 self.mouse_release()
500
501 def wait(self, ms: int):
502 """

Callers

nothing calls this directly

Calls 3

move_mouseMethod · 0.95
mouse_pressMethod · 0.95
mouse_releaseMethod · 0.95

Tested by

no test coverage detected