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

Method text

scripts/and_controller.py:142–147  ·  view source on GitHub ↗
(self, input_str)

Source from the content-addressed store, hash-verified

140 return ret
141
142 def text(self, input_str):
143 input_str = input_str.replace(" ", "%s")
144 input_str = input_str.replace("'", "")
145 adb_command = f"adb -s {self.device} shell input text {input_str}"
146 ret = execute_adb(adb_command)
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}"

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