uiautomator
uiautomator copied to clipboard
IOError: RPC server not started!
Something wrong when I try to connect device,.
from uiautomator import Device
d = Device()
print d.info
But I got IOError. I am using window OS. Does it works on windows?
except Exception,e: d.info #try 1/2
@onlinesen I don't know how adding a try/except block can solve anything here.
@CrystalChen1017 Seems you didn't read documentation at all. To use the uiautomator class without set the serial, you need to import lie from uiautomator import device as d
then just print(d.info)
. But, to do that, your first need to set the ANDROID_SERIAL
env variable. I don't really know why there's no subprocess mechanism to get default ID from adb devices command.
I've tried it both via cable and wifi adb and worked with no problem.