Skip to content

sendKeyEvent does not work and "pressKeyCode" method is not available in javaclient #244

@amitjaincoer191

Description

@amitjaincoer191

Suddenly sendKetEvent method stopped working and as per logs "pressKeyCode" method is not available in "java-client 3.1". Please fix this issue. Thanks....

Appium server logs :
{"platformVersion":"4.4.4","platformName":"Android","deviceName":"","appActivity":"SplashScreenActivity","autoLaunch":false,"appPackage":"com.cloverstudio.spika"},"platformName":"Android","deviceName":"","appActivity":"SplashScreenActivity","autoLaunch":false,"appPackage":"com.cloverstudio.spika"},"sessionId":"cb5fc214-7e5a-4994-b632-9180865e9cfc"}

info: --> POST /wd/hub/session/cb5fc214-7e5a-4994-b632-9180865e9cfc/appium/device/start_activity {"appPackage":"com.android.settings","appActivity":"com.android.settings.Settings","appWaitPackage":"","appWaitActivity":""}
info: [debug] Getting device API level
info: [debug] executing cmd: adb shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 19
info: [debug] executing cmd: adb shell "am start -S -n com.android.settings/com.android.settings.Settings"
info: [debug] Responding to client with success: {"status":0,"value":"Successfully launched the app.","sessionId":"cb5fc214-7e5a-4994-b632-9180865e9cfc"}
info: <-- POST /wd/hub/session/cb5fc214-7e5a-4994-b632-9180865e9cfc/appium/device/start_activity 200 1535.112 ms - 104 {"status":0,"value":"Successfully launched the app.","sessionId":"cb5fc214-7e5a-4994-b632-9180865e9cfc"}
info: --> POST /wd/hub/session/cb5fc214-7e5a-4994-b632-9180865e9cfc/appium/device/keyevent {"keycode":3}
warn: [DEPRECATED] The keyevent function has been deprecated and will be removed. Please use the pressKeyCode function instead.
info: [debug] Pushing command to appium work queue: ["pressKeyCode",{"keycode":3,"metastate":null}]
error: Unhandled error: TypeError: Cannot call method 'sendAction' of null
at null. (C:\Users\amit.ja\Desktop\android\AppiumForWindows-1.3.4.1\Appium\node_modules\appium\lib\devices\android\android.js:481:24)
at Object.q.process as _onImmediate
at processImmediate as _immediateCallback context: [POST /wd/hub/session/cb5fc214-7e5a-4994-b632-9180865e9cfc/appium/device/keyevent {"keycode":3,"metastate":null}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions