Reputation: 1
I tried to run this program it keep asking for ANDROID_HOME environment.
from uiautomator import device as d
import time
def record_touch_events():
with open("touch_events.txt", "w") as f:
while True:
event = d.device.wait.update()
if event["eventType"] == "k":
f.write(event["key"])
f.write('\n')
elif event["eventType"] == "e":
break
if __name__ == "__main__":
record_touch_events()
enter image description here Here is the error I got
Upvotes: 0
Views: 62