I've been working with the adbClient.py from AndroidViewClient. I've run across the following error thrown occasionally and not sure how to fix it.
Traceback (most recent call last):
File "/Users/damonh/projects/prodtests/tablet/test_homePage.py", line 15, in <module>
print adb.getSdkVersion()
File "/Users/damonh/projects/prodtests/tablet/adbClient.py", line 541, in getSdkVersion
self.__checkTransport()
File "/Users/damonh/projects/prodtests/tablet/adbClient.py", line 312, in __checkTransport
raise RuntimeError("ERROR: Transport is not set")
RuntimeError: ERROR: Transport is not set
an example would be: getSdkVersion()
Here is my test code:
import adbClient
adb=adbClient.AdbClient()
print adb.getSdkVersion()
This is just one. Another would be the shell method. Any help in the right direction would be appreciated.
I thought you script was just an example, but if it's the real one you are missing the serialno parameter to AdbClient
and that's why the transport is not set.
You should do
import adbClient
adb=adbClient.AdbClient(serialno='.*')
print adb.getSdkVersion()
or replace by whatever regular expression or serial number you are intending to use.
To be able to communicate with a specific device, adb
should set the transport using 'host:transport:<serialno>'
, then if the serialno is None
(default value) it cannot be done.