mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 05:10:10 +01: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!")
|