appium The capabilities UnlockType & UnlockKeys doesn't work with the mobile device ( brand Oppo ) - JavaScript
The problem
We tried to use the appium capabilities UnlockType & UnlockKeys with Oppo devices but it always failed . It's weird because this two capabilities work well with other brand of device like Samsung , huawei or Xiaomi.
Environment
- Appium version : 1.18.3
- Mobile platform/version under test: Oppo
- Real device or emulator/simulator: Real device
Details
Link to Appium logs
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided [debug] [BaseDriver] Creating session with W3C capabilities: { [debug] [BaseDriver] "alwaysMatch": { [debug] [BaseDriver] "browserName": "android", [debug] [BaseDriver] "appium:gpsEnabled": true, [debug] [BaseDriver] "appium:platform": "ANDROID", [debug] [BaseDriver] "platformName": "android", [debug] [BaseDriver] "appium:version": "", [debug] [BaseDriver] "appium:unicodeKeyboard": "true", [debug] [BaseDriver] "appium:resetKeyboard": "true", [debug] [BaseDriver] "appium:unlockType": "pin", [debug] [BaseDriver] "appium:unlockKey": "151096", [debug] [BaseDriver] "appium:app": "C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk", [debug] [BaseDriver] "appium:appWaitActivity": "com.leroymerlin.recherche.ui.productlist.ProductListActivity", [debug] [BaseDriver] "appium:autoGrantPermissions": true, [debug] [BaseDriver] "appium:automationName": "UIAutomator2", [debug] [BaseDriver] "appium:deviceName": "Oppo", [debug] [BaseDriver] "appium:udid": "d534aaac" [debug] [BaseDriver] }, [debug] [BaseDriver] "firstMatch": [ [debug] [BaseDriver] {} [debug] [BaseDriver] ] [debug] [BaseDriver] } [BaseDriver] Capability 'unicodeKeyboard' changed from string to boolean. This may cause unexpected behavior [BaseDriver] Capability 'resetKeyboard' changed from string to boolean. This may cause unexpected behavior [BaseDriver] The following capabilities were provided, but are not recognized by Appium: [BaseDriver] platform [BaseDriver] version [AndroidDriver] The desired capabilities should generally not include both an 'app' and a 'browserName' [BaseDriver] Session created with session id: 5e09d27d-da65-4f3d-9c0e-f22b4177689e [BaseDriver] Using local app 'C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk' [debug] [UiAutomator2] Checking whether app is actually present [ADB] Found 1 'build-tools' folders under 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk' (newest first): [ADB] C:/Users/CorentinSAILLY/AppData/Local/Android/Sdk/build-tools/30.0.3 [ADB] Using 'adb.exe' from 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server' [AndroidDriver] Retrieving device list [debug] [ADB] Trying to find a connected android device [debug] [ADB] Getting connected devices [debug] [ADB] Connected devices: [{"udid":"d534aaac","state":"device"}] [AndroidDriver] Using device: d534aaac [ADB] Using 'adb.exe' from 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server' [debug] [ADB] Setting device id to d534aaac [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell getprop ro.build.version.sdk' [debug] [ADB] Current device property 'ro.build.version.sdk': 30 [ADB] Getting device platform version [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell getprop ro.build.version.release' [debug] [ADB] Current device property 'ro.build.version.release': 11 [debug] [ADB] Device API level: 30 [UiAutomator2] Relaxing hidden api policy [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell 'settings put global hiddenapipolicyprepapps 1;settings put global hiddenapipolicypapps 1;settings put global hiddenapipolicy 1'' [UiAutomator2] Sorry! 'gpsEnabled' capability is only available for emulators [debug] [AndroidDriver] Parsing package and activity from app manifest [ADB] Package name: 'com.leroymerlin.recherche' [ADB] Main activity name: 'com.leroymerlin.pandroid.app.PandroidLaunchActivity' [debug] [AndroidDriver] Parsed package and activity are: com.leroymerlin.recherche/com.leroymerlin.pandroid.app.PandroidLaunchActivity [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac wait-for-device' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell echo ping' [debug] [AndroidDriver] Pushing settings apk to device... [debug] [ADB] Getting install status for io.appium.settings [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package io.appium.settings' [debug] [ADB] 'io.appium.settings' is installed [debug] [ADB] Getting package info for 'io.appium.settings' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package io.appium.settings' [debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.2.0' >= '3.2.0') [debug] [ADB] There is no need to install/upgrade 'C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\io.appium.settings\apks\settingsapk-debug.apk' [debug] [ADB] Getting IDs of all 'io.appium.settings' processes [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell 'pgrep --help; echo $?'' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell pgrep -f io\.appium\.settings' [debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions. [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell appops set io.appium.settings android\:mocklocation allow' [debug] [Logcat] Starting logs capture with command: C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac logcat -v threadtime [debug] [AndroidDriver] Enabling Unicode keyboard support [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell settings get secure defaultinputmethod' [debug] [AndroidDriver] Unsetting previous IME io.appium.settings/.UnicodeIME [debug] [AndroidDriver] Setting IME to 'io.appium.settings/.UnicodeIME' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell ime enable io.appium.settings/.UnicodeIME' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell ime set io.appium.settings/.UnicodeIME' [debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8201 [debug] [ADB] Forwarding system: 8201 to device: 6790 [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac forward tcp\:8201 tcp\:6790' [debug] [ADB] Getting install status for io.appium.uiautomator2.server [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package io.appium.uiautomator2.server' [debug] [ADB] 'io.appium.uiautomator2.server' is installed [debug] [ADB] Getting package info for 'io.appium.uiautomator2.server' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package io.appium.uiautomator2.server' [debug] [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.12.2' >= '4.12.2') [debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled [debug] [ADB] Checking app cert for C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.12.2.apk [ADB] Using 'apksigner.jar' from 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\build-tools\30.0.3\lib\apksigner.jar' [debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-16.0.1\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\build-tools\30.0.3\lib\apksigner.jar verify --print-certs C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.12.2.apk [debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US [debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc [debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81 [debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87 [debug] [ADB] [debug] [ADB] 'C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.12.2.apk' is signed with the default certificate [debug] [ADB] Getting install status for io.appium.uiautomator2.server.test [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package io.appium.uiautomator2.server.test' [debug] [ADB] 'io.appium.uiautomator2.server.test' is installed [debug] [ADB] Checking app cert for C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk [debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-16.0.1\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\build-tools\30.0.3\lib\apksigner.jar verify --print-certs C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk [debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US [debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc [debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81 [debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87 [debug] [ADB] [debug] [ADB] 'C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate [UiAutomator2] Server packages are not going to be (re)installed [debug] [UiAutomator2] Waiting up to 30000ms for services to be available [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell pm list instrumentation' [debug] [UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available [debug] [ADB] Checking app cert for C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk [debug] [ADB] Starting apksigner: 'C:\Program Files\Java\jdk-16.0.1\bin\java.exe' -Xmx1024M -Xss1m -jar C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\build-tools\30.0.3\lib\apksigner.jar verify --print-certs C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk [debug] [ADB] apksigner stdout: Signer #1 certificate DN: O=Leroy Merlin France, ST=France [debug] [ADB] Signer #1 certificate SHA-256 digest: 0683dd09e79c58921d24f10f63268613859d4688af3def9e88a2804b3c1db26b [debug] [ADB] Signer #1 certificate SHA-1 digest: c585917e8c69353af2af605a5aa8b625adb597a0 [debug] [ADB] Signer #1 certificate MD5 digest: b15a23739eb513fc5dc6f7ae42842dd6 [debug] [ADB] [debug] [ADB] 'C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk' is signed with a non-default certificate [debug] [ADB] Getting install status for com.leroymerlin.recherche [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package com.leroymerlin.recherche' [debug] [ADB] 'com.leroymerlin.recherche' is installed [debug] [ADB] Getting package info for 'com.leroymerlin.recherche' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package com.leroymerlin.recherche' [debug] [ADB] The version code of the installed 'com.leroymerlin.recherche' is greater than the application version code (70 > 67) [debug] [ADB] There is no need to downgrade 'com.leroymerlin.recherche' [AndroidDriver] Performing fast reset on 'com.leroymerlin.recherche' [debug] [ADB] Getting install status for com.leroymerlin.recherche [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package com.leroymerlin.recherche' [debug] [ADB] 'com.leroymerlin.recherche' is installed [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell am force-stop com.leroymerlin.recherche' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell pm clear com.leroymerlin.recherche' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys package com.leroymerlin.recherche' [debug] [ADB] Retrieving requested permissions [debug] [ADB] Retrieved 22 permissions from requested group [debug] [ADB] Retrieving granted permissions [debug] [ADB] Retrieved 7 permissions from install,runtime groups [debug] [ADB] Granting permissions ["android.permission.CAMERA","android.permission.WRITEEXTERNALSTORAGE","android.permission.READEXTERNALSTORAGE","android.permission.ACCESSMEDIALOCATION","android.permission.READEXTERNALSTORAGE","android.permission.CAMERA","android.permission.WRITEEXTERNALSTORAGE","android.permission.ACCESSMEDIALOCATION"] to 'com.leroymerlin.recherche' [debug] [ADB] Got the following command chunks to execute: [["pm","grant","com.leroymerlin.recherche","android.permission.CAMERA",";","pm","grant","com.leroymerlin.recherche","android.permission.WRITEEXTERNALSTORAGE",";","pm","grant","com.leroymerlin.recherche","android.permission.READEXTERNALSTORAGE",";","pm","grant","com.leroymerlin.recherche","android.permission.ACCESSMEDIALOCATION",";","pm","grant","com.leroymerlin.recherche","android.permission.READEXTERNALSTORAGE",";","pm","grant","com.leroymerlin.recherche","android.permission.CAMERA",";","pm","grant","com.leroymerlin.recherche","android.permission.WRITEEXTERNALSTORAGE",";","pm","grant","com.leroymerlin.recherche","android.permission.ACCESSMEDIALOCATION",";"]] [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell pm grant com.leroymerlin.recherche android.permission.CAMERA \; pm grant com.leroymerlin.recherche android.permission.WRITEEXTERNALSTORAGE \; pm grant com.leroymerlin.recherche android.permission.READEXTERNALSTORAGE \; pm grant com.leroymerlin.recherche android.permission.ACCESSMEDIALOCATION \; pm grant com.leroymerlin.recherche android.permission.READEXTERNALSTORAGE \; pm grant com.leroymerlin.recherche android.permission.CAMERA \; pm grant com.leroymerlin.recherche android.permission.WRITEEXTERNALSTORAGE \; pm grant com.leroymerlin.recherche android.permission.ACCESSMEDIALOCATION \;' [debug] [AndroidDriver] Performed fast reset on the installed 'com.leroymerlin.recherche' application (stop and clear) [debug] [UiAutomator2] Performing shallow cleanup of automation leftovers [debug] [UiAutomator2] No obsolete sessions have been detected (socket hang up) [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell am force-stop io.appium.uiautomator2.server.test' [UiAutomator2] Starting UIAutomator2 server 4.12.2 [UiAutomator2] Using UIAutomator2 server from 'C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.12.2.apk' and test from 'C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' [UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online... [debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","d534aaac","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"] [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server: [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}} [debug] [UiAutomator2] The initialization of the instrumentation process took 4165ms [debug] [WD Proxy] Matched '/session' to command name 'createSession' [debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8201/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"ANDROID","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"android","platformName":"android","gpsEnabled":true,"platform":"ANDROID","version":"","unicodeKeyboard":true,"resetKeyboard":true,"unlockType":"pin","unlockKey":"151096","app":"C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk","appWaitActivity":"com.leroymerlin.recherche.ui.productlist.ProductListActivity","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"Oppo","udid":"d534aaac"},"browserName":"android","platformName":"android","gpsEnabled":true,"version":"","unicodeKeyboard":true,"resetKeyboard":true,"unlockType":"pin","unlockKey":"151096","app":"C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk","appWaitActivity":"com.leroymerlin.recherche.ui.productlist.ProductListActivity",... [debug] [WD Proxy] Got response with status 200: {"sessionId":"bc38ed86-385d-421b-91cc-127e845f8eec","value":{"capabilities":{"firstMatch":[{"platform":"ANDROID","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"android","platformName":"android","gpsEnabled":true,"platform":"ANDROID","version":"","unicodeKeyboard":true,"resetKeyboard":true,"unlockType":"pin","unlockKey":"151096","app":"C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk","appWaitActivity":"com.leroymerlin.recherche.ui.productlist.ProductListActivity","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"Oppo","udid":"d534aaac"},"browserName":"android","platformName":"android","gpsEnabled":true,"version":"","unicodeKeyboard":true,"resetKeyboard":true,"unlockType":"pin","unlockKey":"151096","app":"C:\Users\Public\CerberusAPK\recherche-colibri-arlequin-4.2.0-release.apk","appWaitActivity":"co... [WD Proxy] Determined the downstream protocol as 'W3C' [debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8201/wd/hub/session/bc38ed86-385d-421b-91cc-127e845f8eec/appium/device/info] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"bc38ed86-385d-421b-91cc-127e845f8eec","value":{"androidId":"8fc13a43c3a9b377","apiVersion":"30","bluetooth":{"state":"OFF"},"brand":"OPPO","carrierName":"","displayDensity":480,"locale":"frFR","manufacturer":"OPPO","model":"CPH2067","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":336000,"linkUpstreamBandwidthKbps":336000,"networkCapabilities":"NETCAPABILITYNOTMETERED,NETCAPABILITYINTERNET,NETCAPABILITYNOTRESTRICTED,NETCAPABILITYTRUSTED,NETCAPABILITYNOTVPN,NETCAPABILITYVALIDATED,NETCAPABILITYNOTROAMING,NETCAPABILITYFOREGROUND,NETCAPABILITYNOTCONGESTED,NETCAPABILITYNOTSUSPENDED","signalStrength":-37,"transportTypes":"TRANSPORTWIFI"},"detailedState":"CONNECTED","extraInfo":"","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":0,"subtypeName":"","type":1,"typeName":"WIFI"},{"capabilities":{"SSID":null,"linkDownBandwidthKbps":336000,"linkUpstreamBandwidthKbps":336000,"networkCapabilities":"NETCAPABI... [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys window' [debug] [AndroidDriver] Screen is locked, trying to unlock [AndroidDriver] Trying to unlock device using pin 151096 [AndroidDriver] Waking up the device to unlock it [debug] [WD Proxy] Matched '/appium/device/presskeycode' to command name 'pressKeyCode' [debug] [WD Proxy] Proxying [POST /appium/device/presskeycode] to [POST http://127.0.0.1:8201/wd/hub/session/bc38ed86-385d-421b-91cc-127e845f8eec/appium/device/presskeycode] with body: {"keycode":26,"metastate":null,"flags":null} [debug] [WD Proxy] Got response with status 200: {"sessionId":"bc38ed86-385d-421b-91cc-127e845f8eec","value":null} [debug] [WD Proxy] Matched '/appium/device/presskeycode' to command name 'pressKeyCode' [debug] [WD Proxy] Proxying [POST /appium/device/presskeycode] to [POST http://127.0.0.1:8201/wd/hub/session/bc38ed86-385d-421b-91cc-127e845f8eec/appium/device/presskeycode] with body: {"keycode":224,"metastate":null,"flags":null} [debug] [WD Proxy] Got response with status 200: {"sessionId":"bc38ed86-385d-421b-91cc-127e845f8eec","value":null} [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell dumpsys inputmethod' [AndroidDriver] Dismiss notifications from unlock view [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell service call notification 1' [debug] [ADB] Pressing the BACK button [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell input keyevent 4' [AndroidDriver] Trying to dismiss keyguard [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell wm dismiss-keyguard' [debug] [BaseDriver] Waiting up to 0 ms for condition [debug] [WD Proxy] Matched '/elements' to command name 'findElements' [debug] [WD Proxy] Proxying [POST /elements] to [POST http://127.0.0.1:8201/wd/hub/session/bc38ed86-385d-421b-91cc-127e845f8eec/elements] with body: {"strategy":"id","selector":"com.android.systemui:id/digittext","context":"","multiple":true} [debug] [WD Proxy] Got response with status 200: {"sessionId":"bc38ed86-385d-421b-91cc-127e845f8eec","value":[]} [debug] [UiAutomator2] Deleting UiAutomator2 session [debug] [UiAutomator2] Deleting UiAutomator2 server session [debug] [WD Proxy] Matched '/' to command name 'deleteSession' [debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8201/wd/hub/session/bc38ed86-385d-421b-91cc-127e845f8eec] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"bc38ed86-385d-421b-91cc-127e845f8eec","value":null} [debug] [UiAutomator2] Resetting IME to 'io.appium.settings/.UnicodeIME' [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell ime set io.appium.settings/.UnicodeIME' [debug] [Instrumentation] . [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell am force-stop com.leroymerlin.recherche' [debug] [Logcat] Stopping logcat capture [debug] [ADB] Removing forwarded port socket connection: 8201 [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac forward --remove tcp\:8201' [UiAutomator2] Restoring hidden api policy to the device default configuration [debug] [ADB] Running 'C:\Users\CorentinSAILLY\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s d534aaac shell 'settings delete global hiddenapipolicyprepapps;settings delete global hiddenapipolicypapps;settings delete global hiddenapipolicy'' [debug] [Instrumentation] Time: 8,099 [debug] [Instrumentation] [debug] [Instrumentation] OK (1 test) [debug] [BaseDriver] Event 'newSessionStarted' logged at 1629810951376 (15:15:51 GMT+0200 (heure d’été d’Europe centrale)) [debug] [W3C] Encountered internal error running command: Error: Error finding unlock pin buttons! [debug] [W3C] at pinUnlock (C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-android-driver\lib\unlock-helpers.js:105:13) [debug] [W3C] at processTicksAndRejections (internal/process/taskqueues.js:95:5) [debug] [W3C] at Object.unlockWithUIAutomation (C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-android-driver\lib\android-helpers.js:643:3) [debug] [W3C] at Object.unlock (C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-android-driver\lib\android-helpers.js:690:5) [debug] [W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-driver\lib\driver.js:397:7) [debug] [W3C] at AndroidUiautomator2Driver.createSession (C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\nodemodules\appium-uiautomator2-driver\lib\driver.js:221:7) [debug] [W3C] at AppiumDriver.createSession (C:\Users\CorentinSAILLY\AppData\Roaming\npm\nodemodules\appium\lib\appium.js:358:35) [debug] [W3C] Destroying socket connection [HTTP] <-- POST /wd/hub/session 500 14793 ms - 645 [HTTP] [debug] [Instrumentation] The process has exited with code 0
2 Answer:
I assume you could try out pinWithKeyEvent
as unlockType
in appium@rc
or appium@beta
Unfortunately different vendors use different lock screens, so it is almost impossible to unify these. Feel free to pop up a PR to Appium if you'd like to add a support for this feature. Closed as duplicate of https://github.com/appium/appium/issues/10649
Read next
- Drag capability for experimental-figspec - TypeScript storybook-addon-designs
- react-refresh-webpack-plugin - Fast refresh not accept any change in any place, require full page refresh. JavaScript
- Remove Images completely - trix
- When using mybatisplus plus goupBy for paging query, the count parameter is not encrypted - Java shardingsphere
- SIGINT takes 10+ seconds to quit - TypeScript functions-framework-nodejs
- tensorflow Slower on a Nvidia 1080TI GPU than on CPU - Cplusplus
- Add CLI flags to docs - starport
- mmocr Training KIE model on custom dataset getting very low F1-score Python