mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 23:23:27 +02:00
17 lines
323 B
Python
17 lines
323 B
Python
|
#!/usr/bin/env python2
|
||
|
|
||
|
from com.dtmilano.android.viewclient import ViewClient
|
||
|
|
||
|
vc = ViewClient(*ViewClient.connectToDeviceOrExit())
|
||
|
|
||
|
button = vc.findViewWithText("OFF")
|
||
|
|
||
|
if button:
|
||
|
(x, y) = button.getXY()
|
||
|
button.touch()
|
||
|
else:
|
||
|
print("Button not found. Is the app currently running?")
|
||
|
exit()
|
||
|
|
||
|
print("Done!")
|