Skip to content

Instantly share code, notes, and snippets.

@KazuCocoa
Last active October 30, 2018 08:42
Show Gist options
  • Save KazuCocoa/717ee0469a1f312cd55310d904824544 to your computer and use it in GitHub Desktop.
Save KazuCocoa/717ee0469a1f312cd55310d904824544 to your computer and use it in GitHub Desktop.

https://github.com/appium/ruby_lib_core/blob/master/test/functional/android/webdriver/w3c_actions_test.rb#L22

Client

@driver.action.click(el).perform

Appium (b672a53006 of master. Server apks are working branch )

[HTTP] --> POST /wd/hub/session/3a38fe61-1fd5-4403-827c-ccb1f4123950/actions
[HTTP] {"actions":[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"bd61d4fc-5ce9-441e-a7dc-6c4b0a50a12f"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}]}
[debug] [W3C (3a38fe61)] Calling AppiumDriver.performActions() with args: [[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"bd61d4fc-5ce9-441e-a7dc-6c4b0a50a12f"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}],"3a38fe61-1fd5-4403-827c-ccb1f4123950"]
[debug] [UiAutomator2] Received the following W3C actions: [
[debug] [UiAutomator2]   {
[debug] [UiAutomator2]     "type": "pointer",
[debug] [UiAutomator2]     "id": "mouse",
[debug] [UiAutomator2]     "actions": [
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerMove",
[debug] [UiAutomator2]         "duration": 50,
[debug] [UiAutomator2]         "x": 0,
[debug] [UiAutomator2]         "y": 0,
[debug] [UiAutomator2]         "origin": {
[debug] [UiAutomator2]           "element-6066-11e4-a52e-4f735466cecf": "bd61d4fc-5ce9-441e-a7dc-6c4b0a50a12f"
[debug] [UiAutomator2]         }
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerDown",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerUp",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       }
[debug] [UiAutomator2]     ],
[debug] [UiAutomator2]     "parameters": {
[debug] [UiAutomator2]       "pointerType": "mouse"
[debug] [UiAutomator2]     }
[debug] [UiAutomator2]   }
[debug] [UiAutomator2] ]
[debug] [UiAutomator2] Preprocessed actions: [
[debug] [UiAutomator2]   {
[debug] [UiAutomator2]     "type": "pointer",
[debug] [UiAutomator2]     "id": "mouse",
[debug] [UiAutomator2]     "actions": [
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerMove",
[debug] [UiAutomator2]         "duration": 50,
[debug] [UiAutomator2]         "x": 0,
[debug] [UiAutomator2]         "y": 0,
[debug] [UiAutomator2]         "origin": {
[debug] [UiAutomator2]           "element-6066-11e4-a52e-4f735466cecf": "bd61d4fc-5ce9-441e-a7dc-6c4b0a50a12f"
[debug] [UiAutomator2]         }
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerDown",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerUp",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       }
[debug] [UiAutomator2]     ],
[debug] [UiAutomator2]     "parameters": {
[debug] [UiAutomator2]       "pointerType": "touch"
[debug] [UiAutomator2]     }
[debug] [UiAutomator2]   }
[debug] [UiAutomator2] ]
[debug] [JSONWP Proxy] Matched '/actions' to command name 'performActions'
[debug] [JSONWP Proxy] Proxying [POST /actions] to [POST http://localhost:8200/wd/hub/session/38a3ab68-ad02-4881-9e6a-869c9f150390/actions] with body: {"actions":[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"bd61d4fc-5ce9-441e-a7dc-6c4b0a50a12f"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}]}
[JSONWP Proxy] Got an unexpected response: {"sessionId":"38a3ab68-ad02-4881-9e6a-869c9f150390","status":13,"value":"Unable to perform W3C actions. Check the logcat output for possible error reports and make sure your input actions chain is valid."}
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[debug] [W3C (3a38fe61)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to perform W3C actions. Check the logcat output for possible error reports and make sure your input actions chain is valid.
[debug] [W3C (3a38fe61)]     at errorFromMJSONWPStatusCode (/Users/kazuaki/GitHub/appium/node_modules/appium-base-driver/lib/protocol/errors.js:789:10)
[debug] [W3C (3a38fe61)]     at ProxyRequestError.getActualError (/Users/kazuaki/GitHub/appium/node_modules/appium-base-driver/lib/protocol/errors.js:683:14)
[debug] [W3C (3a38fe61)]     at /Users/kazuaki/GitHub/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:234:19
[debug] [W3C (3a38fe61)]     at Generator.throw (<anonymous>)
[debug] [W3C (3a38fe61)]     at asyncGeneratorStep (/Users/kazuaki/GitHub/appium/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
[debug] [W3C (3a38fe61)]     at _throw (/Users/kazuaki/GitHub/appium/node_modules/@babel/runtime/helpers/asyncToGenerator.js:29:9)
[HTTP] <-- POST /wd/hub/session/3a38fe61-1fd5-4403-827c-ccb1f4123950/actions 500 180 ms - 1134
[HTTP]

Adb

2018-10-30 17:23:11.036 11475-11481/io.appium.android.apis I/zygote: Do full code cache collection, code=125KB, data=68KB
2018-10-30 17:23:11.036 11475-11481/io.appium.android.apis I/zygote: After code cache collection, code=107KB, data=45KB
2018-10-30 17:23:20.395 11444-11498/io.appium.uiautomator2.server I/appium: channel read invoked!
2018-10-30 17:23:20.396 11444-11498/io.appium.uiautomator2.server I/appium: channel read: POST /wd/hub/session/38a3ab68-ad02-4881-9e6a-869c9f150390/actions
2018-10-30 17:23:20.397 11444-11498/io.appium.uiautomator2.server D/appium: payload: {"actions":[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"bd61d4fc-5ce9-441e-a7dc-6c4b0a50a12f"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}]}
2018-10-30 17:23:20.410 11444-11449/io.appium.uiautomator2.server I/zygote: Do partial code cache collection, code=60KB, data=33KB
2018-10-30 17:23:20.410 11444-11449/io.appium.uiautomator2.server I/zygote: After code cache collection, code=60KB, data=33KB
2018-10-30 17:23:20.410 11444-11449/io.appium.uiautomator2.server I/zygote: Increasing code cache capacity to 256KB
2018-10-30 17:23:20.493 1686-4107/system_process E/InputDispatcher: Motion event has duplicate pointer id 0
2018-10-30 17:23:20.493 1686-4107/system_process W/InputManager: Input event injection from pid 11434 failed.
2018-10-30 17:23:20.494 11444-11498/io.appium.uiautomator2.server D/appium: [3689848 (fail)] Synthesized MotionEvent { action=ACTION_POINTER_DOWN(0), actionButton=0, id[0]=0, x[0]=540.0, y[0]=1692.0, toolType[0]=TOOL_TYPE_MOUSE, id[1]=0, x[1]=540.0, y[1]=1692.0, toolType[1]=TOOL_TYPE_MOUSE, buttonState=BUTTON_PRIMARY, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=2, historySize=0, eventTime=3689862, downTime=3689848, deviceId=0, source=0x2002 }
2018-10-30 17:23:20.494 1686-4107/system_process E/InputDispatcher: Motion event has duplicate pointer id 0
2018-10-30 17:23:20.495 11444-11498/io.appium.uiautomator2.server D/appium: [3689848 (fail)] Synthesized MotionEvent { action=ACTION_POINTER_UP(0), actionButton=0, id[0]=0, x[0]=540.0, y[0]=1692.0, toolType[0]=TOOL_TYPE_MOUSE, id[1]=0, x[1]=540.0, y[1]=1692.0, toolType[1]=TOOL_TYPE_MOUSE, buttonState=BUTTON_PRIMARY, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=2, historySize=0, eventTime=3689864, downTime=3689848, deviceId=0, source=0x2002 }
2018-10-30 17:23:20.501 11444-11498/io.appium.uiautomator2.server I/appium: AppiumResponse: {"sessionId":"38a3ab68-ad02-4881-9e6a-869c9f150390","status":13,"value":"Unable to perform W3C actions. Check the logcat output for possible error reports and make sure your input actions chain is valid."}
2018-10-30 17:23:27.989 1686-1702/system_process E/memtrack: Couldn't load memtrack module
2018-10-30 17:23:27.989 1686-1702/system_process W/android.os.Debug: failed to get memory consumption info: -1
2018-10-30 17:23:28.003 1686-1702/system_process E/memtrack: Couldn't load memtrack module
2018-10-30 17:23:28.003 1686-1702/system_process W/android.os.Debug: failed to get memory consumption info: -1
2018-10-30 17:23:28.017 1686-1702/system_process E/memtrack: Couldn't load memtrack module
2018-10-30 17:23:28.017 1686-1702/system_process W/android.os.Debug: failed to get memory consumption info: -1
@KazuCocoa
Copy link
Author

KazuCocoa commented Oct 30, 2018

b672a53006 of master. Server apks are 2.0.0 based.

@driver.action.click(el).perform

Appium

[HTTP] --> POST /wd/hub/session/df5ff223-6a5a-4d21-8ab4-b2a1f28617a4/actions
[HTTP] {"actions":[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"f5839337-635e-4b99-af43-7cfb57a890fd"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}]}
[debug] [W3C] Calling AppiumDriver.performActions() with args: [[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"f5839337-635e-4b99-af43-7cfb57a890fd"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}],"df5ff223-6a5a-4d21-8ab4-b2a1f28617a4"]
[debug] [UiAutomator2] Received the following W3C actions: [
[debug] [UiAutomator2]   {
[debug] [UiAutomator2]     "type": "pointer",
[debug] [UiAutomator2]     "id": "mouse",
[debug] [UiAutomator2]     "actions": [
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerMove",
[debug] [UiAutomator2]         "duration": 50,
[debug] [UiAutomator2]         "x": 0,
[debug] [UiAutomator2]         "y": 0,
[debug] [UiAutomator2]         "origin": {
[debug] [UiAutomator2]           "element-6066-11e4-a52e-4f735466cecf": "f5839337-635e-4b99-af43-7cfb57a890fd"
[debug] [UiAutomator2]         }
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerDown",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerUp",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       }
[debug] [UiAutomator2]     ],
[debug] [UiAutomator2]     "parameters": {
[debug] [UiAutomator2]       "pointerType": "mouse"
[debug] [UiAutomator2]     }
[debug] [UiAutomator2]   }
[debug] [UiAutomator2] ]
[debug] [UiAutomator2] Preprocessed actions: [
[debug] [UiAutomator2]   {
[debug] [UiAutomator2]     "type": "pointer",
[debug] [UiAutomator2]     "id": "mouse",
[debug] [UiAutomator2]     "actions": [
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerMove",
[debug] [UiAutomator2]         "duration": 50,
[debug] [UiAutomator2]         "x": 0,
[debug] [UiAutomator2]         "y": 0,
[debug] [UiAutomator2]         "origin": {
[debug] [UiAutomator2]           "element-6066-11e4-a52e-4f735466cecf": "f5839337-635e-4b99-af43-7cfb57a890fd"
[debug] [UiAutomator2]         }
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerDown",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       },
[debug] [UiAutomator2]       {
[debug] [UiAutomator2]         "type": "pointerUp",
[debug] [UiAutomator2]         "button": 0
[debug] [UiAutomator2]       }
[debug] [UiAutomator2]     ],
[debug] [UiAutomator2]     "parameters": {
[debug] [UiAutomator2]       "pointerType": "touch"
[debug] [UiAutomator2]     }
[debug] [UiAutomator2]   }
[debug] [UiAutomator2] ]
[debug] [JSONWP Proxy] Matched '/actions' to command name 'performActions'
[debug] [JSONWP Proxy] Proxying [POST /actions] to [POST http://localhost:8200/wd/hub/session/86a01c3b-9ce7-49ae-b77d-e51cfd4d2431/actions] with body: {"actions":[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"f5839337-635e-4b99-af43-7cfb57a890fd"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}]}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"86a01c3b-9ce7-49ae-b77d-e51cfd4d2431","status":0,"value":"OK"}
[debug] [W3C] Responding to client with driver.performActions() result: "OK"
[HTTP] <-- POST /wd/hub/session/df5ff223-6a5a-4d21-8ab4-b2a1f28617a4/actions 200 155 ms - 14
[HTTP]

Adb

2018-10-30 17:06:48.358 10951-10966/io.appium.android.ime I/zygote: WaitForGcToComplete blocked ProfileSaver on HeapTrim for 6.923ms
2018-10-30 17:06:57.739 10902-10969/io.appium.uiautomator2.server I/appium: channel read invoked!
2018-10-30 17:06:57.739 10902-10969/io.appium.uiautomator2.server I/appium: channel read: POST /wd/hub/session/86a01c3b-9ce7-49ae-b77d-e51cfd4d2431/actions
2018-10-30 17:06:57.742 10902-10969/io.appium.uiautomator2.server D/appium: payload: {"actions":[{"type":"pointer","id":"mouse","actions":[{"type":"pointerMove","duration":50,"x":0,"y":0,"origin":{"element-6066-11e4-a52e-4f735466cecf":"f5839337-635e-4b99-af43-7cfb57a890fd"}},{"type":"pointerDown","button":0},{"type":"pointerUp","button":0}],"parameters":{"pointerType":"mouse"}}]}
2018-10-30 17:06:57.780 10902-10969/io.appium.uiautomator2.server D/W3CActions: Generated MotionEvent for action '0'
2018-10-30 17:06:57.787 10902-10969/io.appium.uiautomator2.server D/W3CActions: Generated MotionEvent for action '1'
2018-10-30 17:06:57.839 10902-10969/io.appium.uiautomator2.server I/appium: AppiumResponse: {"sessionId":"86a01c3b-9ce7-49ae-b77d-e51cfd4d2431","status":0,"value":"OK"}
    
    --------- beginning of system
2018-10-30 17:06:57.877 1686-4107/system_process I/ActivityManager: START u0 {cmp=io.appium.android.apis/.ApiDemos (has extras)} from uid 10085
2018-10-30 17:06:57.883 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4543597 , only wrote 4543200
2018-10-30 17:06:58.020 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4549772 , only wrote 4549680
2018-10-30 17:06:58.046 1686-1702/system_process E/memtrack: Couldn't load memtrack module
2018-10-30 17:06:58.046 1686-1702/system_process W/android.os.Debug: failed to get memory consumption info: -1
2018-10-30 17:06:58.047 1544-1627/? D/AudioFlinger: mixer(0xed503b00) throttle end: throttle time(12)
2018-10-30 17:06:58.051 1394-4356/? W/audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
2018-10-30 17:06:58.097 1394-4356/? I/chatty: uid=1041(audioserver) writer identical 3 lines
2018-10-30 17:06:58.323 1394-4356/? W/audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
2018-10-30 17:06:58.398 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4567847 , only wrote 4566240
2018-10-30 17:06:58.417 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4567123 , only wrote 4566240
2018-10-30 17:06:58.488 10932-10937/io.appium.android.apis I/zygote: Do partial code cache collection, code=117KB, data=63KB
2018-10-30 17:06:58.491 10932-10937/io.appium.android.apis I/zygote: After code cache collection, code=117KB, data=63KB
2018-10-30 17:06:58.491 10932-10937/io.appium.android.apis I/zygote: Increasing code cache capacity to 512KB
2018-10-30 17:06:58.578 1413-1413/? D/SurfaceFlinger: duplicate layer name: changing io.appium.android.apis/io.appium.android.apis.ApiDemos to io.appium.android.apis/io.appium.android.apis.ApiDemos#1
2018-10-30 17:06:58.594 1402-2176/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 7753728
2018-10-30 17:06:58.599 1402-2176/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 7753728
2018-10-30 17:06:58.609 1402-1402/? D/gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 7753728
2018-10-30 17:06:58.633 10902-10907/io.appium.uiautomator2.server I/zygote: Do partial code cache collection, code=60KB, data=34KB
2018-10-30 17:06:58.633 10902-10907/io.appium.uiautomator2.server I/zygote: After code cache collection, code=60KB, data=34KB
2018-10-30 17:06:58.633 10902-10907/io.appium.uiautomator2.server I/zygote: Increasing code cache capacity to 256KB
2018-10-30 17:06:58.717 10932-10937/io.appium.android.apis I/zygote: JIT allocated 56KB for compiled code of void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int)
2018-10-30 17:06:58.732 10932-10949/io.appium.android.apis D/EGL_emulation: eglMakeCurrent: 0xee8aa5a0: ver 3 0 (tinfo 0xe69d4dd0)
2018-10-30 17:06:58.759 10951-10951/io.appium.android.ime I/AppiumUnicodeIME: onFinishInput
2018-10-30 17:06:58.759 10951-10951/io.appium.android.ime I/AppiumUnicodeIME: onStartInput
2018-10-30 17:06:58.776 1686-1710/system_process I/ActivityManager: Displayed io.appium.android.apis/.ApiDemos: +740ms
2018-10-30 17:06:58.799 1403-1447/? D/gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
2018-10-30 17:06:58.800 1403-1447/? D/gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
2018-10-30 17:06:58.801 1403-1447/? D/gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
2018-10-30 17:06:58.801 1403-1447/? D/gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
2018-10-30 17:06:58.802 1403-1447/? D/gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
2018-10-30 17:06:58.803 1403-1447/? D/gralloc_ranchu: gralloc_unregister_buffer: exiting HostConnection (is buffer-handling thread)
2018-10-30 17:07:00.003 1686-1702/system_process E/memtrack: Couldn't load memtrack module
2018-10-30 17:07:00.003 1686-1702/system_process W/android.os.Debug: failed to get memory consumption info: -1
2018-10-30 17:07:00.023 1403-1434/? D/hwcomposer: hw_composer sent 108 syncs in 60s
2018-10-30 17:07:00.829 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4682030 , only wrote 4680720
2018-10-30 17:07:00.833 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4680921 , only wrote 4680720
2018-10-30 17:07:00.864 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4682206 , only wrote 4681440
2018-10-30 17:07:00.879 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4682176 , only wrote 4681440
2018-10-30 17:07:00.934 1394-4356/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4684051 , only wrote 4682160
2018-10-30 17:07:00.970 1394-4356/? W/audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
2018-10-30 17:07:01.100 1394-1394/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 4697759 , only wrote 4690080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment