Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver.swipe() last argument not working on android chrome browser #1091

Open
SABERYJS opened this issue Feb 6, 2025 · 4 comments
Open

driver.swipe() last argument not working on android chrome browser #1091

SABERYJS opened this issue Feb 6, 2025 · 4 comments

Comments

@SABERYJS
Copy link

SABERYJS commented Feb 6, 2025

appium version

Appium v2.15.0

chrome driver version

124.0.6367.207

when i test driver.swipe() on android chrome browser,as follows:

screen_size = driver.get_window_size()
width = screen_size['width']
height = screen_size['height']

print("screen size ",width, height)

fromX=width/2
fromY=height/2+100
endX=width/2+50
endY=100
driver.swipe(fromX,height,endX,0,5000)
endY-fromY=300

i set last argument duration to 5000ms (5 seconds),but the action finished quickly with no delay

@KazuCocoa
Copy link
Member

Please attach the full appium server side log

@SABERYJS
Copy link
Author

SABERYJS commented Feb 7, 2025

@KazuCocoa

PS C:\Users\saber> appium server --allow-insecure chromedriver_autodownload
[Appium] Welcome to Appium v2.15.0
[Appium] Non-default server args:
[Appium] {
allowInsecure: [
'chromedriver_autodownload'
]
}
[Appium] The autodetected Appium home path: C:\Users\saber.appium
[Appium] Attempting to load driver uiautomator2...
[Appium] Attempting to load driver chromium...
[Appium] Requiring driver at C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\build\index.js
[Appium] Requiring driver at C:\Users\saber.appium\node_modules\appium-chromium-driver\index.js
[Appium] AndroidUiautomator2Driver has been successfully loaded in 0.407s
[Appium] ChromiumDriver has been successfully loaded in 0.750s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
http://192.168.0.102:4723/
http://192.168.119.1:4723/
http://192.168.112.1:4723/
http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] Available drivers:
[Appium] - [email protected] (automationName 'UiAutomator2')
[Appium] - [email protected] (automationName 'Chromium')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] Request idempotency key: 8ed43fc7-2e50-459d-aad9-231f1b9102ee
[HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:automationName":"UIAutomator2","platformName":"Android","appium:deviceName":"192.168.0.104:5555","browserName":"Chrome","appium:noReset":true}}}
[AppiumDriver@c10a] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:automationName":"UIAutomator2","platformName":"Android","appium:deviceName":"192.168.0.104:5555","browserName":"Chrome","appium:noReset":true}}]
[AppiumDriver@c10a] Event 'newSessionRequested' logged at 1738891434543 (09:23:54 GMT+0800 (中国标准时间))
[Appium] Attempting to find matching driver for automationName 'UIAutomator2' and platformName 'Android'
[Appium] The 'uiautomator2' driver was installed and matched caps.
[Appium] Will require it at C:\Users\saber.appium\node_modules\appium-uiautomator2-driver
[Appium] Requiring driver at C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\build\index.js
[AppiumDriver@c10a] Appium v2.15.0 creating new AndroidUiautomator2Driver (v4.0.0) session
[AppiumDriver@c10a] Checking BaseDriver versions for Appium and AndroidUiautomator2Driver
[AppiumDriver@c10a] Appium's BaseDriver version is 9.15.0
[AppiumDriver@c10a] AndroidUiautomator2Driver's BaseDriver version is 9.15.0
[AppiumDriver@c10a] Explicitly enabling use of insecure features:
[AppiumDriver@c10a] chromedriver_autodownload
[AndroidUiautomator2Driver@707b]
[AndroidUiautomator2Driver@707b] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "Android",
"browserName": "Chrome",
"appium:automationName": "UIAutomator2",
"appium:deviceName": "192.168.0.104:5555",
"appium:noReset": true
},
"firstMatch": [
{}
]
}
[3b19adf9][AndroidUiautomator2Driver@707b] Session created with session id: 3b19adf9-69dd-415b-8c9e-633b9d819816
[3b19adf9][ADB] Found 0 'build-tools' folders under 'D:\android_sdk' (newest first):
[3b19adf9][ADB] Using 'adb.exe' from 'D:\android_sdk\platform-tools\adb.exe'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 start-server'
[3b19adf9][AndroidUiautomator2Driver@707b] Retrieving device list
[3b19adf9][ADB] Trying to find connected Android devices
[3b19adf9][ADB] Getting connected devices
[3b19adf9][ADB] Connected devices: [{"udid":"192.168.0.104:5555","state":"device"},{"udid":"emulator-5554","state":"device"}]
[3b19adf9][AndroidUiautomator2Driver@707b] Using device: 192.168.0.104:5555
[3b19adf9][ADB] Using 'adb.exe' from 'D:\android_sdk\platform-tools\adb.exe'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 start-server'
[3b19adf9][ADB] Setting device id to 192.168.0.104:5555
[3b19adf9][AndroidUiautomator2Driver@707b] We're going to run a Chrome-based session
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell getprop ro.build.version.sdk'
[3b19adf9][ADB] Current device property 'ro.build.version.sdk': 28
[3b19adf9][ADB] Getting device platform version
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell getprop ro.build.version.release'
[3b19adf9][ADB] Current device property 'ro.build.version.release': 9
[3b19adf9][ADB] Device API level: 28
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell cmd package resolve-activity --brief com.android.chrome'
[3b19adf9][AndroidUiautomator2Driver@707b] Chrome-type package and activity are com.android.chrome and com.android.chrome/com.google.android.apps.chrome.Main
[3b19adf9][AndroidUiautomator2Driver@707b] Starting 'com.android.chrome' directly on the device
[3b19adf9][AndroidUiautomator2Driver@707b] Relaxing hidden api policy
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[3b19adf9][AndroidUiautomator2Driver@707b] Pushing settings apk to the device...
[3b19adf9][ADB] Getting package info for 'io.appium.settings'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys package io.appium.settings'
[3b19adf9][ADB] Error 'Could not find 'aapt2.exe' in ["D:\android_sdk\platform-tools\aapt2.exe","D:\android_sdk\emulator\aapt2.exe","D:\android_sdk\cmdline-tools\latest\bin\aapt2.exe","D:\android_sdk\tools\aapt2.exe","D:\android_sdk\tools\bin\aapt2.exe","D:\android_sdk\aapt2.exe"]. Do you have Android Build Tools installed at 'D:\android_sdk'?' while getting badging info
[3b19adf9][ADB] Cannot read version codes of 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk' and/or 'io.appium.settings'
[3b19adf9][ADB] Cannot read version names of 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk' and/or 'io.appium.settings'
[3b19adf9][ADB] The current install state of 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk' is unknown. Installing anyway
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 help'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 features'
[3b19adf9][ADB] The application at 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 install -r -g C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[3b19adf9][ADB] The installation of 'settings_apk-debug.apk' took 259ms
[3b19adf9][ADB] Install command stdout: Performing Streamed Install
Success
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys activity services io.appium.settings'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys activity services io.appium.settings'
[3b19adf9][SettingsApp] Starting Appium Settings app
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell am start-activity -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys activity services io.appium.settings'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys activity services io.appium.settings'
[3b19adf9][Logcat] Starting logs capture with command: D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 logcat -v threadtime
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell appops set io.appium.settings android:mock_location allow'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell "[ -e '/data/local/tmp/mock_apps.json' ] && echo PASS"'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell cat /data/local/tmp/mock_apps.json'
[3b19adf9][AndroidUiautomator2Driver@707b] Forwarding UiAutomator2 Server port 6790 to local port 8200
[3b19adf9][ADB] Forwarding system: 8200 to device: 6790
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 forward tcp:8200 tcp:6790'
[3b19adf9][ADB] Getting package info for 'io.appium.uiautomator2.server'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys package io.appium.uiautomator2.server'
[3b19adf9][ADB] Getting install status for io.appium.uiautomator2.server.test
[3b19adf9][AndroidUiautomator2Driver@707b] No app capability. Assuming it is already on the device
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell cmd package list packages'
[3b19adf9][ADB] Error 'Could not find 'aapt2.exe' in ["D:\android_sdk\platform-tools\aapt2.exe","D:\android_sdk\emulator\aapt2.exe","D:\android_sdk\cmdline-tools\latest\bin\aapt2.exe","D:\android_sdk\tools\aapt2.exe","D:\android_sdk\tools\bin\aapt2.exe","D:\android_sdk\aapt2.exe"]. Do you have Android Build Tools installed at 'D:\android_sdk'?' while getting badging info
[3b19adf9][ADB] Cannot read version codes of 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.2.3.apk' and/or 'io.appium.uiautomator2.server'
[3b19adf9][ADB] Cannot read version names of 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.2.3.apk' and/or 'io.appium.uiautomator2.server'
[3b19adf9][ADB] 'io.appium.uiautomator2.server.test' is installed
[3b19adf9][AndroidUiautomator2Driver@707b] Server packages status: [{"installState":"unknown","appPath":"C:\Users\saber\.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.2.3.apk","appId":"io.appium.uiautomator2.server"},{"installState":"sameVersionInstalled","appPath":"C:\Users\saber\.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk","appId":"io.appium.uiautomator2.server.test"}]
[3b19adf9][AndroidUiautomator2Driver@707b] Server packages are not going to be (re)installed
[3b19adf9][AndroidUiautomator2Driver@707b] Waiting up to 30000ms for services to be available
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell pm list instrumentation'
[3b19adf9][AndroidUiautomator2Driver@707b] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[3b19adf9][ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[3b19adf9][ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]]
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[3b19adf9][AndroidUiautomator2Driver@707b] Performing shallow cleanup of automation leftovers
[3b19adf9][AndroidUiautomator2Driver@707b] No obsolete sessions have been detected (socket hang up)
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell am force-stop io.appium.uiautomator2.server'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell am force-stop io.appium.uiautomator2.server.test'
[3b19adf9][AndroidUiautomator2Driver@707b] Starting UIAutomator2 server 7.2.3
[3b19adf9][AndroidUiautomator2Driver@707b] Using UIAutomator2 server from 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.2.3.apk' and test from 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[3b19adf9][AndroidUiautomator2Driver@707b] Waiting up to 30000ms for UiAutomator2 to be online...
[3b19adf9][ADB] Creating ADB subprocess with args: ["-P","5037","-s","192.168.0.104:5555","shell","am","instrument","-w","-e","disableAnalytics","true","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[3b19adf9][AndroidUiautomator2Driver@707b] Matched '/status' to command name 'getStatus'
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[3b19adf9][AndroidUiautomator2Driver@707b] socket hang up
[3b19adf9][AndroidUiautomator2Driver@707b] [Instrumentation]
[3b19adf9][AndroidUiautomator2Driver@707b] Matched '/status' to command name 'getStatus'
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[3b19adf9][AndroidUiautomator2Driver@707b] socket hang up
[3b19adf9][AndroidUiautomator2Driver@707b] Matched '/status' to command name 'getStatus'
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[3b19adf9][AndroidUiautomator2Driver@707b] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[3b19adf9][AndroidUiautomator2Driver@707b] The initialization of the instrumentation process took 2132ms
[3b19adf9][AndroidUiautomator2Driver@707b] Matched '/session' to command name 'createSession'
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [POST /session] to [POST http://127.0.0.1:8200/session] with body: {"capabilities":{"firstMatch":[{"platformName":"Android","browserName":"Chrome","automationName":"UIAutomator2","deviceName":"192.168.0.104:5555","noReset":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","browserName":"Chrome","automationName":"UIAutomator2","deviceName":"192.168.0.104:5555","noReset":true,"appPackage":"com.android.chrome","appActivity":"com.android.chrome/com.google.android.apps.chrome.Main"},"deviceUDID":"192.168.0.104:5555"}],"alwaysMatch":{}}}
[3b19adf9][AndroidUiautomator2Driver@707b] Got response with status 200: {"sessionId":"b6e6f09c-3d32-4b56-ab46-18e0c26a38ed","value":{"capabilities":{"firstMatch":[{"platformName":"Android","browserName":"Chrome","automationName":"UIAutomator2","deviceName":"192.168.0.104:5555","noReset":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","browserName":"Chrome","automationName":"UIAutomator2","deviceName":"192.168.0.104:5555","noReset":true,"appPackage":"com.android.chrome","appActivity":"com.android.chrome/com.google.android.apps.chrome.Main"},"deviceUDID":"192.168.0.104:5555"}],"alwaysMatch":{}},"sessionId":"b6e6f09c-3d32-4b56-ab46-18e0c26a38ed"}}
[3b19adf9][AndroidUiautomator2Driver@707b] Determined the downstream protocol as 'W3C'
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/session/b6e6f09c-3d32-4b56-ab46-18e0c26a38ed/appium/device/pixel_ratio] with no body
[3b19adf9][AndroidUiautomator2Driver@707b] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/session/b6e6f09c-3d32-4b56-ab46-18e0c26a38ed/appium/device/system_bars] with no body
[3b19adf9][AndroidUiautomator2Driver@707b] Matched '/window/current/size' to command name 'getWindowSize'
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/session/b6e6f09c-3d32-4b56-ab46-18e0c26a38ed/window/current/size] with no body
[3b19adf9][AndroidUiautomator2Driver@707b] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/session/b6e6f09c-3d32-4b56-ab46-18e0c26a38ed/appium/device/info] with no body
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys window'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys power'
[3b19adf9][AndroidUiautomator2Driver@707b] Got response with status 200: {"sessionId":"b6e6f09c-3d32-4b56-ab46-18e0c26a38ed","value":3}
[3b19adf9][AndroidUiautomator2Driver@707b] Got response with status 200: {"sessionId":"b6e6f09c-3d32-4b56-ab46-18e0c26a38ed","value":{"statusBar":72}}
[3b19adf9][AndroidUiautomator2Driver@707b] Got response with status 200: {"sessionId":"b6e6f09c-3d32-4b56-ab46-18e0c26a38ed","value":{"height":1920,"width":1080}}
[3b19adf9][AndroidUiautomator2Driver@707b] Screen already unlocked, doing nothing
[3b19adf9][AndroidUiautomator2Driver@707b] Starting a chrome-based browser session
[3b19adf9][AndroidUiautomator2Driver@707b] A port was not given, using random free port: 51663
[3b19adf9][AndroidUiautomator2Driver@707b] Precalculated Chromedriver capabilities: {
"androidPackage": "com.android.chrome",
"androidDeviceSerial": "192.168.0.104:5555"
}
[3b19adf9][AndroidUiautomator2Driver@707b] Before starting chromedriver, androidPackage is 'com.android.chrome'
[3b19adf9][Chromedriver@e88e] Changed state to 'starting'
[3b19adf9][Chromedriver@e88e] Using the static Chromedriver->Chrome mapping
[3b19adf9][Chromedriver@e88e] The most recent known Chrome version: 132.0.6834
[3b19adf9][AndroidUiautomator2Driver@707b] Got response with status 200: {"sessionId":"b6e6f09c-3d32-4b56-ab46-18e0c26a38ed","value":{"androidId":"e8ac15696bab1588","apiVersion":"28","bluetooth":{"state":"ON"},"brand":"SONY","carrierName":"FarEasTone","displayDensity":480,"locale":"en_US","manufacturer":"SONY","model":"SO-02L","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":1048576,"linkUpstreamBandwidthKbps":1048576,"networkCapabilities":"NET_CAPABILITY_NOT_METERED,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-50,"transportTypes":"TRANSPORT_WIFI"},"detailedState":"CONNECTED","extraInfo":null,"isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":0,"subtypeName":"","type":1,"typeName":"WIFI"}],"platformVersion":"9","realDisplaySize":"1080x1920","timeZone":"Asia/Taipei"}}
[3b19adf9][Chromedriver@e88e] Found 1 executable in 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-chromedriver\chromedriver\win'
[3b19adf9][Chromedriver@e88e] The following Chromedriver executables were found:
[3b19adf9][Chromedriver@e88e] 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver-win64_v124.0.6367.207.exe' (version '124.0.6367.207', minimum Chrome version '124.0.6367')
[3b19adf9][ADB] Getting package info for 'com.android.chrome'
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 shell dumpsys package com.android.chrome'
[3b19adf9][Chromedriver@e88e] Found Chrome bundle 'com.android.chrome' version '124.0.6367'
[3b19adf9][Chromedriver@e88e] Found 1 executable capable of automating Chrome '124.0.6367'.
Choosing the most recent, 'C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver-win64_v124.0.6367.207.exe'.
[3b19adf9][Chromedriver@e88e] If a specific version is required, specify it with the 'chromedriverExecutable' capability.
[3b19adf9][Chromedriver@e88e] Set chromedriver binary as: C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver-win64_v124.0.6367.207.exe
[3b19adf9][Chromedriver@e88e] Killing any old chromedrivers, running: wmic process where "commandline like '%chromedriver.exe%--port=51663%'" delete
[3b19adf9][Chromedriver@e88e] No old chromedrivers seem to exist
[3b19adf9][Chromedriver@e88e] Cleaning this device's adb forwarded port socket connections: 192.168.0.104:5555
[3b19adf9][ADB] List forwarding ports
[3b19adf9][ADB] Running 'D:\android_sdk\platform-tools\adb.exe -P 5037 -s 192.168.0.104:5555 forward --list'
[3b19adf9][Chromedriver@e88e] Spawning Chromedriver with: C:\Users\saber.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-chromedriver\chromedriver\win\chromedriver-win64_v124.0.6367.207.exe --port=51663 --adb-port=5037 --verbose
[3b19adf9][Chromedriver@e88e] Matched '/status' to command name 'getStatus'
[3b19adf9][Chromedriver@e88e] Proxying [GET /status] to [GET http://127.0.0.1:51663/status] with no body
[3b19adf9][Chromedriver@e88e] connect ECONNREFUSED 127.0.0.1:51663
[3b19adf9][Chromedriver@e88e] Matched '/status' to command name 'getStatus'
[3b19adf9][Chromedriver@e88e] Proxying [GET /status] to [GET http://127.0.0.1:51663/status] with no body
[3b19adf9][Chromedriver@e88e] Got response with status 200: {"value":{"build":{"version":"124.0.6367.207 (a9001a6e39fbaa559510ca866052950457dd4e6b-refs/branch-heads/6367_201@{#3})"},"message":"ChromeDriver ready for new sessions.","os":{"arch":"x86_64","name":"Windows NT","version":"10.0.26100"},"ready":true}}
[3b19adf9][Chromedriver@e88e] Chromedriver version: 124.0.6367.207
[3b19adf9][Chromedriver@e88e] Starting W3C Chromedriver session with capabilities: {
"capabilities": {
"alwaysMatch": {
"goog:chromeOptions": {
"androidPackage": "com.android.chrome",
"androidDeviceSerial": "192.168.0.104:5555"
},
"goog:loggingPrefs": {
"browser": "ALL"
}
}
}
}
[3b19adf9][Chromedriver@e88e] Matched '/session' to command name 'createSession'
[3b19adf9][Chromedriver@e88e] Proxying [POST /session] to [POST http://127.0.0.1:51663/session] with body: {"capabilities":{"alwaysMatch":{"goog:chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.0.104:5555"},"goog:loggingPrefs":{"browser":"ALL"}}}}
[3b19adf9][Chromedriver@e88e] Webview version: 'Chrome/124.0.6367.82'
[3b19adf9][Chromedriver@e88e] Got response with status 200: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"124.0.6367.82","chrome":{"chromedriverVersion":"124.0.6367.207 (a9001a6e39fbaa559510ca866052950457dd4e6b-refs/branch-heads/6367_201@{#3})"},"fedcm:accounts":true,"goog:chromeOptions":{"debuggerAddress":"localhost:51690"},"pageLoadStrategy":"normal","platformName":"android","proxy":{},"setWindowRect":false,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify","webauthn:extension:credBlob":false,"webauthn:extension:largeBlob":false,"webauthn:extension:minPinLength":false,"webauthn:extension:prf":false,"webauthn:virtualAuthenticators":false},"sessionId":"3f2bf1198f03f996c786cb4ade116dc1"}}
[3b19adf9][Chromedriver@e88e] Determined the downstream protocol as 'W3C'
[3b19adf9][Chromedriver@e88e] Changed state to 'online'
[3b19adf9][AppiumDriver@c10a] New AndroidUiautomator2Driver session created successfully, session 3b19adf9-69dd-415b-8c9e-633b9d819816 added to master session list
[3b19adf9][AppiumDriver@c10a] Event 'newSessionStarted' logged at 1738891442444 (09:24:02 GMT+0800 (中国标准时间))
[3b19adf9][AndroidUiautomator2Driver@707b] Cached the protocol value 'W3C' for the new session 3b19adf9-69dd-415b-8c9e-633b9d819816
[3b19adf9][AndroidUiautomator2Driver@707b] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"Android","browserName":"Chrome","automationName":"UIAutomator2","deviceName":"192.168.0.104:5555","noReset":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","browserName":"Chrome","automationName":"UIAutomator2","deviceName":"192.168.0.104:5555","noReset":true,"appPackage":"com.android.chrome","appActivity":"com.android.chrome/com.google.android.apps.chrome.Main"},"deviceUDID":"192.168.0.104:5555","pixelRatio":"3","statBarHeight":72,"viewportRect":{"left":0,"top":72,"width":1080,"height":1848},"deviceApiLevel":28,"platformVersion":"9","deviceManufacturer":"SONY","deviceModel":"SO-02L","deviceScreenSize":"1080x1920","deviceScreenDensity":480}}
[3b19adf9][HTTP] <-- POST /session 200 7907 ms - 930
[3b19adf9][HTTP] --> POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/url {"url":"https://www.browserstack.com/"}
[3b19adf9][AndroidUiautomator2Driver@707b] Driver proxy active, passing request on via HTTP proxy
[3b19adf9][Chromedriver@e88e] Matched '/session/3b19adf9-69dd-415b-8c9e-633b9d819816/url' to command name 'setUrl'
[3b19adf9][Chromedriver@e88e] Proxying [POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/url] to [POST http://127.0.0.1:51663/session/3f2bf1198f03f996c786cb4ade116dc1/url] with body: {"url":"https://www.browserstack.com/"}
[3b19adf9][Chromedriver@e88e] Got response with status 200: {"value":null}
[3b19adf9][HTTP] <-- POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/url 200 2553 ms - 14
[3b19adf9][HTTP] --> GET /session/3b19adf9-69dd-415b-8c9e-633b9d819816/title {}
[3b19adf9][AndroidUiautomator2Driver@707b] Driver proxy active, passing request on via HTTP proxy
[3b19adf9][Chromedriver@e88e] Matched '/session/3b19adf9-69dd-415b-8c9e-633b9d819816/title' to command name 'title'
[3b19adf9][Chromedriver@e88e] Proxying [GET /session/3b19adf9-69dd-415b-8c9e-633b9d819816/title] to [GET http://127.0.0.1:51663/session/3f2bf1198f03f996c786cb4ade116dc1/title] with no body
[3b19adf9][Chromedriver@e88e] Got response with status 200: {"value":"Most Reliable App & Cross Browser Testing Platform | BrowserStack"}
[3b19adf9][HTTP] <-- GET /session/3b19adf9-69dd-415b-8c9e-633b9d819816/title 200 16 ms - 77
[3b19adf9][HTTP] --> GET /session/3b19adf9-69dd-415b-8c9e-633b9d819816/window/rect {}
[3b19adf9][AndroidUiautomator2Driver@707b] Driver proxy active, passing request on via HTTP proxy
[3b19adf9][Chromedriver@e88e] Matched '/session/3b19adf9-69dd-415b-8c9e-633b9d819816/window/rect' to command name 'getWindowRect'
[3b19adf9][Chromedriver@e88e] Proxying [GET /session/3b19adf9-69dd-415b-8c9e-633b9d819816/window/rect] to [GET http://127.0.0.1:51663/session/3f2bf1198f03f996c786cb4ade116dc1/window/rect] with no body
[3b19adf9][Chromedriver@e88e] Got response with status 200: {"value":{"height":560,"width":360,"x":0,"y":0}}
[3b19adf9][HTTP] <-- GET /session/3b19adf9-69dd-415b-8c9e-633b9d819816/window/rect 200 15 ms - 48
[3b19adf9][HTTP] --> POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions {"actions":[{"type":"pointer","parameters":{"pointerType":"touch"},"id":"touch","actions":[{"type":"pointerMove","duration":250,"x":180,"y":560,"origin":"viewport"},{"type":"pointerDown","duration":0,"button":0},{"type":"pointerMove","duration":500,"x":230,"y":0,"origin":"viewport"},{"type":"pointerUp","duration":0,"button":0}]}]}
[3b19adf9][AndroidUiautomator2Driver@707b] Driver proxy active, passing request on via HTTP proxy
[3b19adf9][Chromedriver@e88e] Matched '/session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions' to command name 'performActions'
[3b19adf9][Chromedriver@e88e] Proxying [POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions] to [POST http://127.0.0.1:51663/session/3f2bf1198f03f996c786cb4ade116dc1/actions] with body: {"actions":[{"type":"pointer","parameters":{"pointerType":"touch"},"id":"touch","actions":[{"type":"pointerMove","duration":250,"x":180,"y":560,"origin":"viewport"},{"type":"pointerDown","duration":0,"button":0},{"type":"pointerMove","duration":500,"x":230,"y":0,"origin":"viewport"},{"type":"pointerUp","duration":0,"button":0}]}]}
[3b19adf9][Chromedriver@e88e] Got response with status 200: {"value":null}
[3b19adf9][HTTP] <-- POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions 200 843 ms - 14
[Appium] Received SIGINT - shutting down
[AppiumDriver@c10a] Cleaning up 1 active session

@SABERYJS
Copy link
Author

SABERYJS commented Feb 7, 2025

@KazuCocoa
actions json log:

{
    "actions": [
        {
            "type": "pointer",
            "parameters": {
                "pointerType": "touch"
            },
            "id": "touch",
            "actions": [
                {
                    "type": "pointerMove",
                    "duration": 250,
                    "x": 180,
                    "y": 380,
                    "origin": "viewport"
                },
                {
                    "type": "pointerDown",
                    "duration": 0,
                    "button": 0
                },
                {
                    "type": "pointerMove",
                    "duration": 5000,
                    "x": 230,
                    "y": 100,
                    "origin": "viewport"
                },
                {
                    "type": "pointerUp",
                    "duration": 0,
                    "button": 0
                }
            ]
        }
    ]
}

@KazuCocoa
Copy link
Member

It looks like Appium proxied the command to the chromedriver. If it didn't work, the issue might be in chromedriver/chrome engine. Reporting it to Google would help.

[3b19adf9][HTTP] --> POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions {"actions":[{"type":"pointer","parameters":{"pointerType":"touch"},"id":"touch","actions":[{"type":"pointerMove","duration":250,"x":180,"y":560,"origin":"viewport"},{"type":"pointerDown","duration":0,"button":0},{"type":"pointerMove","duration":500,"x":230,"y":0,"origin":"viewport"},{"type":"pointerUp","duration":0,"button":0}]}]}
[3b19adf9][AndroidUiautomator2Driver@707b] Driver proxy active, passing request on via HTTP proxy
[3b19adf9][Chromedriver@e88e] Matched '/session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions' to command name 'performActions'
[3b19adf9][Chromedriver@e88e] Proxying [POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions] to [POST http://127.0.0.1:51663/session/3f2bf1198f03f996c786cb4ade116dc1/actions] with body: {"actions":[{"type":"pointer","parameters":{"pointerType":"touch"},"id":"touch","actions":[{"type":"pointerMove","duration":250,"x":180,"y":560,"origin":"viewport"},{"type":"pointerDown","duration":0,"button":0},{"type":"pointerMove","duration":500,"x":230,"y":0,"origin":"viewport"},{"type":"pointerUp","duration":0,"button":0}]}]}
[3b19adf9][Chromedriver@e88e] Got response with status 200: {"value":null}
[3b19adf9][HTTP] <-- POST /session/3b19adf9-69dd-415b-8c9e-633b9d819816/actions 200 843 ms - 14

What the log result with appium:showChromedriverLog? https://github.com/appium/appium-uiautomator2-driver

It would help to show logs in chromedriver level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants