After upgrading the SDK to version 12, when I connect to monkeyrunner and use the push method, for example device.press ("KEYCODE_HOME", "DOWN") Will receive an msg error
Traceback (last last call): File "", line 1, in TypeError: click: the third argument is required.
But I will check sdk doc, which only presses two arguments. This is a problem caused by the new version SDK tool.
To press a key with the monkey runner, you need to use something like device.press('KEYCODE_HOME',MonkeyDevice.DOWN_AND_UP), you do not need to add a third argument.
device.press('KEYCODE_HOME',MonkeyDevice.DOWN_AND_UP)
, , 'DOWN' MonkeyDevice.DOWN
'DOWN'
MonkeyDevice.DOWN
, . MonkeyDevice: DOWN, UP DOWN_AND_UP
MonkeyDevice
DOWN
UP
DOWN_AND_UP
MonkeyDevice, , , Monkeyrunner, 'down', 'up' 'downAndUp'.
'down'
'up'
'downAndUp'
enum ChimpChat.TouchPressType. :
ChimpChat.TouchPressType
public enum TouchPressType { DOWN("down"), UP("up"), DOWN_AND_UP("downAndUp"); ... }
, - device.press('KEYCODE_HOME', 'DOWN', ''), .
.
For example, the paste command would look like this.
device.press('KEYCODE_PASTE',MonkeyDevice.DOWN)