I would like to extend the MonkeyDevice class of the monkeyrunner API. My derived class looks like this.
from com.android.monkeyrunner import MonkeyDevice, MonkeyRunner
class TestDevice(MonkeyDevice):
def __init__(self, serial=None):
MonkeyDevice.__init__(self)
self = MonkeyRunner.waitForConnection(deviceId=serial)
self.serial = serial
When I call test_dev = TestDevice(serial)
from another module I get the following error:
test_dev = TestDevice(serial)
TypeError: _new_impl(): 1st arg can't be coerced to com.android.monkeyrunner.core.IMonkeyDevice
What am I doing wrong?
Thanks in advance!