0.先启动appium
1.编写代码
如下:
from appium import webdriver
from appium.webdriver.extensions.android.nativekey import AndroidKey
desired_caps = {
'platformName': 'Android',
'platformVersion': '10',
'deviceName': ':VOG_AL10',
'appPackage': 'com.sankuai.meituan',
'appActivity': 'com.meituan.android.pt.homepage.activity.MainActivity',
'unicodeKeyboard': True,
'resetKeyboard': True,
'noReset': True,
'newCommandTimeout': 6000,
'automationName': 'UiAutomator2'
}
# 连接Appium Server,初始化自动化环境
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
2.运行代码之前打开时间记录
3.日志的查看
The server is running
[2024-06-02 05:53:12][Appium] Welcome to Appium v1.22.3
[2024-06-02 05:53:12][Appium] Non-default server args:
[2024-06-02 05:53:12][Appium] logTimestamp: true
[2024-06-02 05:53:12][Appium] relaxedSecurityEnabled: true
[2024-06-02 05:53:12][Appium] allowInsecure: {
[2024-06-02 05:53:12][Appium] }
[2024-06-02 05:53:12][Appium] denyInsecure: {
[2024-06-02 05:53:12][Appium] }
[2024-06-02 05:53:12][Appium] Appium REST http interface listener started on 0.0.0.0:4723
[2024-06-02 05:53:18][HTTP] Request idempotency key: 1d9e1251-c0b4-4491-9d82-a3dce9e117f8
[2024-06-02 05:53:18][HTTP] --> POST /wd/hub/session
[2024-06-02 05:53:18][HTTP] {"capabilities":{"alwaysMatch":{"platformName":"Android","appium:platformVersion":"10","appium:deviceName":":VOG_AL10","appium:appPackage":"com.sankuai.meituan","appium:appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","appium:unicodeKeyboard":true,"appium:resetKeyboard":true,"appium:noReset":true,"appium:newCommandTimeout":6000,"appium:automationName":"UiAutomator2"},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Android","platformVersion":"10","deviceName":":VOG_AL10","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2"}}
[2024-06-02 05:53:18][W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","platformVersion":"10","deviceName":":VOG_AL10","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2"},null,{"alwaysMatch":{"platformName":"Android","appium:platformVersion":"10","appium:deviceName":":VOG_AL10","appium:appPackage":"com.sankuai.meituan","appium:appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","appium:unicodeKeyboard":true,"appium:resetKeyboard":true,"appium:noReset":true,"appium:newCommandTimeout":6000,"appium:automationName":"UiAutomator2"},"firstMatch":[{}]}]
[2024-06-02 05:53:18][BaseDriver] Event 'newSessionRequested' logged at 1717321998483 (17:53:18 GMT+0800 (中国标准时间))
[2024-06-02 05:53:18][Appium] Appium v1.22.3 creating new AndroidUiautomator2Driver (v1.70.1) session
[2024-06-02 05:53:18][Appium] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[2024-06-02 05:53:18][BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[2024-06-02 05:53:18][BaseDriver] Creating session with W3C capabilities: {
[2024-06-02 05:53:18][BaseDriver] "alwaysMatch": {
[2024-06-02 05:53:18][BaseDriver] "platformName": "Android",
[2024-06-02 05:53:18][BaseDriver] "appium:platformVersion": "10",
[2024-06-02 05:53:18][BaseDriver] "appium:deviceName": ":VOG_AL10",
[2024-06-02 05:53:18][BaseDriver] "appium:appPackage": "com.sankuai.meituan",
[2024-06-02 05:53:18][BaseDriver] "appium:appActivity": "com.meituan.android.pt.homepage.activity.MainActivity",
[2024-06-02 05:53:18][BaseDriver] "appium:unicodeKeyboard": true,
[2024-06-02 05:53:18][BaseDriver] "appium:resetKeyboard": true,
[2024-06-02 05:53:18][BaseDriver] "appium:noReset": true,
[2024-06-02 05:53:18][BaseDriver] "appium:newCommandTimeout": 6000,
[2024-06-02 05:53:18][BaseDriver] "appium:automationName": "UiAutomator2"
[2024-06-02 05:53:18][BaseDriver] },
[2024-06-02 05:53:18][BaseDriver] "firstMatch": [
[2024-06-02 05:53:18][BaseDriver] {}
[2024-06-02 05:53:18][BaseDriver] ]
[2024-06-02 05:53:18][BaseDriver] }
[2024-06-02 05:53:18][BaseDriver] Session created with session id: e2d696a2-5d0b-4f0d-865b-863543d0fb51
[2024-06-02 05:53:18][UiAutomator2] Starting 'com.sankuai.meituan' directly on the device
[2024-06-02 05:53:18][ADB] Found 2 'build-tools' folders under 'G:\Program Files\Java\sdk' (newest first):
[2024-06-02 05:53:18][ADB] G:/Program Files/Java/sdk/build-tools/29.0.3
[2024-06-02 05:53:18][ADB] G:/Program Files/Java/sdk/build-tools/29.0.2
[2024-06-02 05:53:18][ADB] Using 'adb.exe' from 'G:\Program Files\Java\sdk\platform-tools\adb.exe'
[2024-06-02 05:53:18][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 start-server'
[2024-06-02 05:53:18][AndroidDriver] Retrieving device list
[2024-06-02 05:53:18][ADB] Trying to find a connected android device
[2024-06-02 05:53:18][ADB] Getting connected devices
[2024-06-02 05:53:18][ADB] Connected devices: [{"udid":"Q5X7N19605002672","state":"device"}]
[2024-06-02 05:53:18][AndroidDriver] Looking for a device with Android '10.0.0'
[2024-06-02 05:53:18][ADB] Setting device id to Q5X7N19605002672
[2024-06-02 05:53:18][ADB] Getting device platform version
[2024-06-02 05:53:18][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell getprop ro.build.version.release'
[2024-06-02 05:53:18][ADB] Current device property 'ro.build.version.release': 10
[2024-06-02 05:53:18][AndroidDriver] Using device: Q5X7N19605002672
[2024-06-02 05:53:18][ADB] Using 'adb.exe' from 'G:\Program Files\Java\sdk\platform-tools\adb.exe'
[2024-06-02 05:53:18][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 start-server'
[2024-06-02 05:53:18][ADB] Setting device id to Q5X7N19605002672
[2024-06-02 05:53:18][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell getprop ro.build.version.sdk'
[2024-06-02 05:53:18][ADB] Current device property 'ro.build.version.sdk': 29
[2024-06-02 05:53:18][ADB] Getting device platform version
[2024-06-02 05:53:18][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell getprop ro.build.version.release'
[2024-06-02 05:53:18][ADB] Current device property 'ro.build.version.release': 10
[2024-06-02 05:53:18][ADB] Device API level: 29
[2024-06-02 05:53:18][UiAutomator2] Relaxing hidden api policy
[2024-06-02 05:53:18][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 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''
[2024-06-02 05:53:19][AndroidDriver] No app sent in, not parsing package/activity
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 wait-for-device'
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell echo ping'
[2024-06-02 05:53:19][AndroidDriver] Pushing settings apk to device...
[2024-06-02 05:53:19][ADB] Getting install status for io.appium.settings
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell dumpsys package io.appium.settings'
[2024-06-02 05:53:19][ADB] 'io.appium.settings' is installed
[2024-06-02 05:53:19][ADB] Getting package info for 'io.appium.settings'
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell dumpsys package io.appium.settings'
[2024-06-02 05:53:19][ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.4.0' >= '3.4.0')
[2024-06-02 05:53:19][ADB] There is no need to install/upgrade 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[2024-06-02 05:53:19][ADB] Getting IDs of all 'io.appium.settings' processes
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell 'pgrep --help; echo $?''
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[2024-06-02 05:53:19][AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell appops set io.appium.settings android:mock_location allow'
[2024-06-02 05:53:19][Logcat] Starting logs capture with command: 'G:\\Program Files\\Java\\sdk\\platform-tools\\adb.exe' -P 5037 -s Q5X7N19605002672 logcat -v threadtime
[2024-06-02 05:53:19][AndroidDriver] Enabling Unicode keyboard support
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell settings get secure default_input_method'
[2024-06-02 05:53:19][AndroidDriver] Unsetting previous IME io.appium.settings/.UnicodeIME
[2024-06-02 05:53:19][AndroidDriver] Setting IME to 'io.appium.settings/.UnicodeIME'
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell ime enable io.appium.settings/.UnicodeIME'
[2024-06-02 05:53:19][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell ime set io.appium.settings/.UnicodeIME'
[2024-06-02 05:53:20][UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8201
[2024-06-02 05:53:20][ADB] Forwarding system: 8201 to device: 6790
[2024-06-02 05:53:20][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 forward tcp:8201 tcp:6790'
[2024-06-02 05:53:20][UiAutomator2] Server package at 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is not writeable. Will copy it into the temporary location at 'C:\Users\dell\AppData\Local\Temp\202452-27964-axgrd9.ghnb' as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[2024-06-02 05:53:20][UiAutomator2] Server package at 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.27.0.apk' is not writeable. Will copy it into the temporary location at 'C:\Users\dell\AppData\Local\Temp\202452-27964-axgrd9.ghnb' as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[2024-06-02 05:53:20][ADB] Getting install status for io.appium.uiautomator2.server
[2024-06-02 05:53:20][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell dumpsys package io.appium.uiautomator2.server'
[2024-06-02 05:53:20][ADB] 'io.appium.uiautomator2.server' is installed
[2024-06-02 05:53:20][ADB] Getting package info for 'io.appium.uiautomator2.server'
[2024-06-02 05:53:20][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell dumpsys package io.appium.uiautomator2.server'
[2024-06-02 05:53:21][ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.27.0' >= '4.27.0')
[2024-06-02 05:53:21][UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[2024-06-02 05:53:21][ADB] Checking app cert for C:\Users\dell\AppData\Local\Temp\202452-27964-axgrd9.ghnb\appium-uiautomator2-server-v4.27.0.apk
[2024-06-02 05:53:21][ADB] Using 'apksigner.jar' from 'G:\Program Files\Java\sdk\build-tools\29.0.3\lib\apksigner.jar'
[2024-06-02 05:53:21][ADB] Starting apksigner: 'G:\\Program Files\\Java\\jdk-22\\bin\\java.exe' -Xmx1024M -Xss1m -jar 'G:\\Program Files\\Java\\sdk\\build-tools\\29.0.3\\lib\\apksigner.jar' verify --print-certs C:\\Users\\dell\\AppData\\Local\\Temp\\202452-27964-axgrd9.ghnb\\appium-uiautomator2-server-v4.27.0.apk
[2024-06-02 05:53:21][ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[2024-06-02 05:53:21][ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[2024-06-02 05:53:21][ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[2024-06-02 05:53:21][ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[2024-06-02 05:53:21][ADB]
[2024-06-02 05:53:21][ADB] sha256 hash did match for 'appium-uiautomator2-server-v4.27.0.apk'
[2024-06-02 05:53:21][ADB] 'C:\Users\dell\AppData\Local\Temp\202452-27964-axgrd9.ghnb\appium-uiautomator2-server-v4.27.0.apk' is signed with the default certificate
[2024-06-02 05:53:21][ADB] Getting install status for io.appium.uiautomator2.server.test
[2024-06-02 05:53:21][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell dumpsys package io.appium.uiautomator2.server.test'
[2024-06-02 05:53:21][ADB] 'io.appium.uiautomator2.server.test' is installed
[2024-06-02 05:53:21][ADB] Checking app cert for C:\Users\dell\AppData\Local\Temp\202452-27964-axgrd9.ghnb\appium-uiautomator2-server-debug-androidTest.apk
[2024-06-02 05:53:21][ADB] Starting apksigner: 'G:\\Program Files\\Java\\jdk-22\\bin\\java.exe' -Xmx1024M -Xss1m -jar 'G:\\Program Files\\Java\\sdk\\build-tools\\29.0.3\\lib\\apksigner.jar' verify --print-certs C:\\Users\\dell\\AppData\\Local\\Temp\\202452-27964-axgrd9.ghnb\\appium-uiautomator2-server-debug-androidTest.apk
[2024-06-02 05:53:22][ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[2024-06-02 05:53:22][ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[2024-06-02 05:53:22][ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[2024-06-02 05:53:22][ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[2024-06-02 05:53:22][ADB]
[2024-06-02 05:53:22][ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[2024-06-02 05:53:22][ADB] 'C:\Users\dell\AppData\Local\Temp\202452-27964-axgrd9.ghnb\appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[2024-06-02 05:53:22][UiAutomator2] Server packages are not going to be (re)installed
[2024-06-02 05:53:22][UiAutomator2] Waiting up to 30000ms for services to be available
[2024-06-02 05:53:22][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell pm list instrumentation'
[2024-06-02 05:53:22][UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[2024-06-02 05:53:22][ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[2024-06-02 05:53:22][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",";"]]
[2024-06-02 05:53:22][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[2024-06-02 05:53:22][UiAutomator2] No app capability. Assuming it is already on the device
[2024-06-02 05:53:22][UiAutomator2] Performing shallow cleanup of automation leftovers
[2024-06-02 05:53:22][UiAutomator2] The following obsolete sessions are still running: ["86600d71-a983-4a5e-a3da-4c27fd8ab244"]
[2024-06-02 05:53:22][UiAutomator2] Cleaning up 1 obsolete session
[2024-06-02 05:53:23][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell am force-stop io.appium.uiautomator2.server.test'
[2024-06-02 05:53:23][UiAutomator2] Starting UIAutomator2 server 4.27.0
[2024-06-02 05:53:23][UiAutomator2] Using UIAutomator2 server from 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.27.0.apk' and test from 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[2024-06-02 05:53:23][UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[2024-06-02 05:53:23][ADB] Creating ADB subprocess with args: ["-P",5037,"-s","Q5X7N19605002672","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[2024-06-02 05:53:23][WD Proxy] Matched '/status' to command name 'getStatus'
[2024-06-02 05:53:23][WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[2024-06-02 05:53:23][WD Proxy] socket hang up
[2024-06-02 05:53:24][Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[2024-06-02 05:53:24][WD Proxy] Matched '/status' to command name 'getStatus'
[2024-06-02 05:53:24][WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[2024-06-02 05:53:24][WD Proxy] socket hang up
[2024-06-02 05:53:25][WD Proxy] Matched '/status' to command name 'getStatus'
[2024-06-02 05:53:25][WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[2024-06-02 05:53:25][WD Proxy] socket hang up
[2024-06-02 05:53:26][WD Proxy] Matched '/status' to command name 'getStatus'
[2024-06-02 05:53:26][WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[2024-06-02 05:53:26][WD Proxy] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[2024-06-02 05:53:26][UiAutomator2] The initialization of the instrumentation process took 3109ms
[2024-06-02 05:53:26][WD Proxy] Matched '/session' to command name 'createSession'
[2024-06-02 05:53:26][WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8201/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":"10","deviceName":":VOG_AL10","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2"},"platformName":"Android","platformVersion":"10","deviceName":"Q5X7N19605002672","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2","deviceUDID":"Q5X7N19605002672"}],"alwaysMatch":{}}}
[2024-06-02 05:53:26][WD Proxy] Got response with status 200: {"sessionId":"5818c854-ef81-4b4b-b669-4b752caddd7d","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":"10","deviceName":":VOG_AL10","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2"},"platformName":"Android","platformVersion":"10","deviceName":"Q5X7N19605002672","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2","deviceUDID":"Q5X7N19605002672"}],"alwaysMatch":{}},"sessionId":"5818c854-ef81-4b4b-b669-4b752caddd7d"}}
[2024-06-02 05:53:26][WD Proxy] Determined the downstream protocol as 'W3C'
[2024-06-02 05:53:26][WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8201/wd/hub/session/5818c854-ef81-4b4b-b669-4b752caddd7d/appium/device/info] with no body
[2024-06-02 05:53:26][WD Proxy] Got response with status 200: {"sessionId":"5818c854-ef81-4b4b-b669-4b752caddd7d","value":{"androidId":"4247a7c9b8af9bea","apiVersion":"29","bluetooth":{"state":"OFF"},"brand":"HUAWEI","carrierName":"中国电信","displayDensity":480,"locale":"zh_CN_#Hans","manufacturer":"HUAWEI","model":"VOG-AL10","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":-45,"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":"10","realDisplaySize":"1080x2340","timeZone":"Asia/Shanghai"}}
[2024-06-02 05:53:26][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell dumpsys window'
[2024-06-02 05:53:26][AndroidDriver] Screen already unlocked, doing nothing
[2024-06-02 05:53:26][UiAutomator2] Starting 'com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity and waiting for 'com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity'
[2024-06-02 05:53:26][ADB] Running 'G:\Program Files\Java\sdk\platform-tools\adb.exe -P 5037 -s Q5X7N19605002672 shell am start -W -n com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[2024-06-02 05:53:28][WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8201/wd/hub/session/5818c854-ef81-4b4b-b669-4b752caddd7d/appium/device/pixel_ratio] with no body
[2024-06-02 05:53:28][WD Proxy] Got response with status 200: {"sessionId":"5818c854-ef81-4b4b-b669-4b752caddd7d","value":3}
[2024-06-02 05:53:28][WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[2024-06-02 05:53:28][WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8201/wd/hub/session/5818c854-ef81-4b4b-b669-4b752caddd7d/appium/device/system_bars] with no body
[2024-06-02 05:53:28][WD Proxy] Got response with status 200: {"sessionId":"5818c854-ef81-4b4b-b669-4b752caddd7d","value":{"statusBar":104}}
[2024-06-02 05:53:28][WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[2024-06-02 05:53:28][WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8201/wd/hub/session/5818c854-ef81-4b4b-b669-4b752caddd7d/window/current/size] with no body
[2024-06-02 05:53:28][WD Proxy] Got response with status 200: {"sessionId":"5818c854-ef81-4b4b-b669-4b752caddd7d","value":{"height":2118,"width":1080}}
[2024-06-02 05:53:28][Appium] New AndroidUiautomator2Driver session created successfully, session e2d696a2-5d0b-4f0d-865b-863543d0fb51 added to master session list
[2024-06-02 05:53:28][BaseDriver] Event 'newSessionStarted' logged at 1717322008966 (17:53:28 GMT+0800 (中国标准时间))
[2024-06-02 05:53:28][W3C (e2d696a2)] Cached the protocol value 'W3C' for the new session e2d696a2-5d0b-4f0d-865b-863543d0fb51
[2024-06-02 05:53:28][W3C (e2d696a2)] Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":"10","deviceName":":VOG_AL10","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2"},"platformName":"Android","platformVersion":"10","deviceName":"Q5X7N19605002672","appPackage":"com.sankuai.meituan","appActivity":"com.meituan.android.pt.homepage.activity.MainActivity","unicodeKeyboard":true,"resetKeyboard":true,"noReset":true,"newCommandTimeout":6000,"automationName":"UiAutomator2","deviceUDID":"Q5X7N19605002672","deviceApiLevel":29,"deviceScreenSize":"1080x2340","deviceScreenDensity":480,"deviceModel":"VOG-AL10","deviceManufacturer":"HUAWEI","pixelRatio":3,"statBarHeight":104,"vie...
[2024-06-02 05:53:28][HTTP] <-- POST /wd/hub/session 200 10486 ms - 1142
[2024-06-02 05:53:28][HTTP]
4.关于Android_sdk中启用uiautomatorviewer.bat出现闪退的解决办法_uiautomatorviewer.bat闪退怎么办-CSDN博客https://blog.csdn.net/qq_43100098/article/details/134704953?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171732245216800211529102%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=171732245216800211529102&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_click~default-2-134704953-null-null.142^v100^pc_search_result_base5&utm_term=uiautomatorviewer.bat%E9%97%AA%E9%80%80&spm=1018.2226.3001.4187
https://login-ext.identity.oraclecloud.com/oauth2/v1/authorize?response_mode=form_post&response_type=id_token&scope=openid&IDCS_CG_ENC_VER=v2&state=9874djcUCQ0FUDfaSbScOOm0eJY_FYT-VwlInnJNQvY&nonce=IfuMLiyCbsAjS-azF2DksdTHyi-fxbgZk8McRgsb1DY&IDCS_IS_CLOUDGATE=true&X-HOST-IDENTIFIER-NAME=www.oracle.com&idcs_app_name=b6bd2c15850843e9b976040114f11258&idcs_app_resource_url=https%3A%2F%2Fwww.oracle.com%2Fwebapps%2Fredirect%2Fsignon%3Fnexturl%3Dhttps%3A%2F%2Fdownload.oracle.com%2Fotn%2Fjava%2Fjdk%2F8u201-b09%2F42970487e3af4f5aa5bca3f542482c60%2Fjdk-8u201-windows-x64.exe&client_id=2575943aa3ee4cf692fdf1ee85200ffc&IDCS_CG_ENC=true&enc=kiVkGWCHVQl3AgAAPQIAABAgPQIAACMCAAAQAOPg6XQ4oeoV6m3qHP5YZmrzuGBLwQRQhmLodAEZXJ5WGOIufh2XdXkilFoKe1t-p3rPXTIm_VJgsTDFG8Rq4popde9bWCZryGOL9xXBbwRRv5nTTlixq7az_9cp3VHiILt-r0UQXcE94-cNKd9SG8efRt4-AJiQ0ATWp7JuUFNQvrduMnQXLv_7Wm1jcVZ08KLVvl56OPbF3khgGDS_9jPehkYF0GT0TVL74L-gdh7QMfl44QUGGyjDNdOvhMB2vZtKGT8DcYT6-eMWeHpgZ2JDCsmVIBk2Yu3OdoEEjxecu8A4cJOdPrFpuklX4ZI1kctf4_xhZkJwnWB8jCFP0g_3R7UnKX4XIsfgbKwKXPbNPRB-nIF8gJxrek9_CQV9uHIZ6kuYzCViOkLp25lS0XsXBgUJ__5ziK4fz-dDcEH0U0BgwnfylI0-yI__9g2jhB8gN5w_37rBCJyBF0bpPQtdMS1uXB-HSZUwcfKKNWat2DBKfHrAfigGLjv1AP1y5y4qwLpeGhb3XBrY2UTT_jb439w5NINuuUv6fmCZtuWfMe-AbnUTH_vBXlq8uQqF_walPPbilG9cseXRg5H0zQ1x56wI7aFIP9BTiulXP1l1BIfKM8ACSjLYtmS4A-Ji4Yx50YwSgMeRnvTvLp9AMUt4VmIxTI3j9_x02JnD6UqslWDULV8i_yS0yd0wf8Vlc2wHSRvri3nQaHBcBD3yvv83J9BGswrfJda21hhSXLAKQAubsFRt3tDpKNCwf6CRvxnxktoquPCSkhTYdZmH6Oa9k7Xzsto29qDr-3AYLomLLNm-
成功的解决方法,我的情况
关于Android_sdk中启用uiautomatorviewer.bat出现闪退的解决办法_uiautomatorviewer.bat闪退怎么办-CSDN博客https://blog.csdn.net/qq_43100098/article/details/134704953?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171732245216800211529102%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=171732245216800211529102&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_click~default-2-134704953-null-null.142^v100^pc_search_result_base5&utm_term=uiautomatorviewer.bat%E9%97%AA%E9%80%80&spm=1018.2226.3001.4187
set java_exe=G:\Program Files\Java\jdk1.8.0_202\bin\java.exe
rem call lib\find_java.bat
5.ui automator viewer 的使用
自动化框架uiautomator2和weditor的安装和使用_weditor 下载-CSDN博客https://blog.csdn.net/yangyue0205/article/details/126735981?ops_request_misc=&request_id=&biz_id=102&utm_term=%E5%A6%82%E6%9E%9C%E8%AE%BE%E5%A4%87%E4%B8%8A%E6%B2%A1%E6%9C%89%E5%AE%89%E8%A3%85uiautomator2%EF%BC%8C%E4%BD%A0%E9%9C%80%E8%A6%81%E5%9C%A8%E8%AE%BE%E5%A4%87%E4%B8%8A%E5%AE%89&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-1-126735981.142^v100^pc_search_result_base5&spm=1018.2226.3001.4187
未完。