MCPcopy
hub / github.com/TencentQQGYLab/AppAgent / long_press

Method long_press

scripts/and_controller.py:149–152  ·  view source on GitHub ↗
(self, x, y, duration=1000)

Source from the content-addressed store, hash-verified

147 return ret
148
149 def long_press(self, x, y, duration=1000):
150 adb_command = f"adb -s {self.device} shell input swipe {x} {y} {x} {y} {duration}"
151 ret = execute_adb(adb_command)
152 return ret
153
154 def swipe(self, x, y, direction, dist="medium", quick=False):
155 unit_dist = int(self.width / 10)

Callers 3

task_executor.pyFile · 0.80
step_recorder.pyFile · 0.80
self_explorer.pyFile · 0.80

Calls 1

execute_adbFunction · 0.85

Tested by

no test coverage detected