• 未添加 uiautomator2 启动成功
    {
    "deviceName": "192.168.66.55:5555",
    "platformName": "Android",
    "appPackage": "com.baidu.searchbox.lite",
    "appActivity": "com.baidu.searchbox.SplashActivity",
    "noReset": "true",
    "recreateChromeDriverSessions": "true"
    }
    [info] [35m[Appium][39m Welcome to Appium v1.8.1
    [info] [35m[Appium][39m Non-default server args:
    [info] [35m[Appium][39m address: 127.0.0.1
    [info] [35m[Appium][39m Appium REST http interface listener started on 127.0.0.1:4723[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
    [info] [35m[HTTP][39m [90m{}[39m
    [debug] [35m[MJSONWP][39m Calling AppiumDriver.getSessions() with args: []
    [debug] [35m[MJSONWP][39m Responding to client with driver.getSessions() result: []
    [info] [35m[HTTP][39m [37m<-- GET /wd/hub/sessions [39m[32m200[39m [90m15 ms - 40[39m
    [info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
    [info] [35m[HTTP][39m [90m{"desiredCapabilities":{"appActivity":"com.baidu.searchbox.SplashActivity","appPackage":"com.baidu.searchbox.lite","deviceName":"192.168.66.55:5555","noReset":"true","platformName":"Android","recreateChromeDriverSessions":"true","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
    [debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"appActivity":"com.baidu.searchbox.SplashActivity","appPackage":"com.baidu.searchbox.lite","deviceName":"192.168.66.55:5555","noReset":"true","platformName":"Android","recreateChromeDriverSessions":"true","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
    [debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1586182734901 (22:18:54 GMT+0800 (中国标准时间))
    [info] [35m[Appium][39m Creating new AndroidDriver (v2.7.0) session
    [info] [35m[Appium][39m Capabilities:
    [info] [35m[Appium][39m appActivity: com.baidu.searchbox.SplashActivity
    [info] [35m[Appium][39m appPackage: com.baidu.searchbox.lite
    [info] [35m[Appium][39m deviceName: 192.168.66.55:5555
    [info] [35m[Appium][39m noReset: true
    [info] [35m[Appium][39m platformName: Android
    [info] [35m[Appium][39m recreateChromeDriverSessions: true
    [info] [35m[Appium][39m newCommandTimeout: 0
    [info] [35m[Appium][39m connectHardwareKeyboard: true
    [debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {"appActivity":"com.baidu.s...
    [warn] [35m[BaseDriver][39m Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
    [warn] [35m[BaseDriver][39m The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.
    [info] [35m[BaseDriver][39m Session created with session id: 0ed41a39-7df9-4403-bd66-cf615c0b4380
    [debug] [35m[AndroidDriver][39m Getting Java version[info] [35m[AndroidDriver][39m Java version is: 1.8.0_121
    [info] [35m[ADB][39m Checking whether adb is present
    [info] [35m[ADB][39m Found 1 'build-tools' folders under 'E:\AppAuto\software\sdk\android-sdk-windows-appium' (newest first):
    [info] [35m[ADB][39m E:/AppAuto/software/sdk/android-sdk-windows-appium/build-tools/28.0.3
    [info] [35m[ADB][39m Using adb.exe from E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe
    [info] [35m[AndroidDriver][39m Retrieving device list
    [debug] [35m[ADB][39m Trying to find a connected android device
    [debug] [35m[ADB][39m Getting connected devices...[debug] [35m[ADB][39m 1 device(s) connected
    [info] [35m[AndroidDriver][39m Using device: 192.168.66.55:5555
    [debug] [35m[ADB][39m Setting device id to 192.168.66.55:5555
    [info] [35m[AndroidDriver][39m App file was not listed, instead we're going to run com.baidu.searchbox.lite directly on the device
    [debug] [35m[AndroidDriver][39m Checking whether package is present on the device
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell pm list packages com.baidu.searchbox.lite'[info] [35m[AndroidDriver][39m Starting Android session
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 wait-for-device'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell echo ping'[debug] [35m[ADB][39m App is not installed
    [debug] [35m[ADB][39m App 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk' not installed. Installing
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.build.version.sdk'[debug] [35m[ADB][39m Current device property 'ro.build.version.sdk': 23
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 install -g 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk''[debug] [35m[ADB][39m Install command stdout: pkg: /data/local/tmp/settings_apk-debug.apk[debug] [35m[ADB][39m Failure [INSTALL_CANCELED_BY_USER]
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell ps'[debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'[warn] [35m[AndroidDriver][39m Failed to launch settings app: Cannot start the 'io.appium.settings' application. Original error: Activity name '.Settings' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell appops set io.appium.settings android:mock_location allow'[warn] [35m[AndroidDriver][39m setDeviceLanguageCountry requires language or country.
    [warn] [35m[AndroidDriver][39m Got language: 'undefined' and country: 'undefined'
    [debug] [35m[Logcat][39m Starting logcat capture[debug] [35m[AndroidDriver][39m Pushing unlock helper app to device...
    [debug] [35m[ADB][39m Getting install status for io.appium.unlock
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell pm list packages io.appium.unlock'[debug] [35m[ADB][39m App is not installed
    [debug] [35m[ADB][39m App 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk' not installed. Installing
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 install -g 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk''[debug] [35m[ADB][39m Install command stdout: pkg: /data/local/tmp/unlock_apk-debug.apk[debug] [35m[ADB][39m Failure [INSTALL_CANCELED_BY_USER]
    [info] [35m[ADB][39m Getting device platform version
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.build.version.release'[debug] [35m[ADB][39m Current device property 'ro.build.version.release': 6.0
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell wm size'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.product.model'[debug] [35m[ADB][39m Current device property 'ro.product.model': Redmi Pro
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.product.manufacturer'[debug] [35m[ADB][39m Current device property 'ro.product.manufacturer': Xiaomi
    [warn] [35m[AndroidDriver][39m No app sent in, not parsing package/activity
    [debug] [35m[AndroidDriver][39m No app capability. Assuming it is already on the device
    [debug] [35m[AndroidBootstrap][39m Watching for bootstrap disconnect
    [debug] [35m[ADB][39m Forwarding system: 4724 to device: 4724
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 forward tcp:4724 tcp:4724'
    [debug] [35m[UiAutomator][39m Starting UiAutomator
    [debug] [35m[UiAutomator][39m Moving to state 'starting'
    [debug] [35m[UiAutomator][39m Parsing uiautomator jar
    [debug] [35m[UiAutomator][39m Found jar name: 'AppiumBootstrap.jar'
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 push 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-android-bootstrap\bootstrap\bin\AppiumBootstrap.jar' /data/local/tmp/'[debug] [35m[ADB][39m Attempting to kill all uiautomator processes
    [debug] [35m[ADB][39m Getting all processes with uiautomator
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell ps'[debug] [35m[ADB][39m Attempting to kill process 24128
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell kill -0 24128'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell kill 24128'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell kill 24128'[warn] [35m[ADB][39m Cannot kill process 24128 in 1000 ms. Trying to force kill...
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell kill -9 24128'[debug] [35m[UiAutomator][39m Starting UIAutomator
    [debug] [35m[ADB][39m Creating ADB subprocess with args: ["-P",5037,"-s","192.168.66.55:5555","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.baidu.searchbox.lite","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false][debug] [35m[UiAutomator][39m Moving to state 'online'
    [info] [35m[AndroidBootstrap][39m Android bootstrap socket is now connected
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell dumpsys window'
    [debug] [35m[AndroidBootstrap][39m [BOOTSTRAP LOG] [debug] Client connected[info] [35m[AndroidDriver][39m Screen already unlocked, doing nothing
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell am start -W -n com.baidu.searchbox.lite/com.baidu.searchbox.SplashActivity -S'[info] [35m[Appium][39m New AndroidDriver session created successfully, session 0ed41a39-7df9-4403-bd66-cf615c0b4380 added to master session list
    [debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1586182751949 (22:19:11 GMT+0800 (中国标准时间))
    [debug] [35m[MJSONWP][39m Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.baidu.searchbox.SplashActivity","appPackage":"com.baidu.searchbox.lite","deviceName":"192.168.66.55:5555","noReset":true,"platformName":"Android","recreateChromeDriverSessions":"true","newCommandTimeout":0,"connectHardwareKeyboard":true},"appActivity":"com.baidu.searchbox.SplashActivity","appPackage":"com.baidu.searchbox.lite","deviceName":"192.168.66.55:5555","noReset":true,"platformName":"Android","recreateChromeDriverSessions":"true","newCommandTimeout":0,"connectHardwareKeyboard":true,"deviceUDID":"192.168.66.55:5555","platformVersion":"6.0","deviceScreenSize":"1080x1920","deviceModel":"Redmi Pro","deviceManufacturer":"Xiaomi"}
    [info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[32m200[39m [90m17052 ms - 936[39m
    [info] [35m[HTTP][39m [90m[39m
    [info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session/0ed41a39-7df9-4403-bd66-cf615c0b4380/context[39m
    [info] [35m[HTTP][39m [90m{"name":"NATIVE_APP"}[39m
    [debug] [35m[MJSONWP][39m Calling AppiumDriver.setContext() with args: ["NATIVE_APP","0ed41a39-7df9-4403-bd66-cf615c0b4380"]
    [debug] [35m[AndroidDriver][39m Getting a list of available webviews
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell cat /proc/net/unix'[debug] [35m[AndroidDriver][39m Found webviews: []
    [debug] [35m[AndroidDriver][39m Available contexts: ["NATIVE_APP"]
    [debug] [35m[MJSONWP][39m Responding to client with driver.setContext() result: null
    [info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/0ed41a39-7df9-4403-bd66-cf615c0b4380/context [39m[32m200[39m [90m364 ms - 76[39m
    [info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/0ed41a39-7df9-4403-bd66-cf615c0b4380/source[39m
    [info] [35m[HTTP][39m [90m{}[39m
    [debug] [35m[MJSONWP][39m Calling AppiumDriver.getPageSource() with args: ["0ed41a39-7df9-4403-bd66-cf615c0b4380"]
    [debug] [35m[AndroidBootstrap][39m Sending command to android: {"cmd":"action","action":"source","params":{}}
    [debug] [35m[AndroidBootstrap][39m [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"source","params":{}}
    [debug] [35m[AndroidBootstrap][39m [BOOTSTRAP LOG] [debug] Got command of type ACTION
    [debug] [35m[AndroidBootstrap][39m [BOOTSTRAP LOG] [debug] Got command action: source[debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] [APPIUM-UIAUTO] [debug] Returning result: {"status":0,"value":"<?xml version=\"1.0\" encoding=\"UTF-8\"?> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] =\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[0,60][1080,1794]\" resource-id=\"com.baidu.searchbox.lite:id\/b5h\" instance=\"6\"><\/android.widget.TextSwitcher> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] ageView\" package=\"com.baidu.searchbox.lite\" content-desc=\"\" checkable=\"false\" checked=\"false\" clickable=\"true\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[788,378][896,486]\" resource-id=\"com.baidu.searchbox.lite:id\/c20\" instance=\"1\"\/><\/android.widget.FrameLayout><\/android.widget.LinearLayout><\/android.widget.FrameLayout><\/android.widget.LinearLayout> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] false\" password=\"false\" selected=\"false\" bounds=\"[165,529][285,631]\" resource-id=\"com.baidu.searchbox.lite:id\/aoc\" instance=\"2\"\/><\/android.widget.LinearLayout><\/android.widget.LinearLayout><\/android.widget.HorizontalScrollView><\/android.widget.LinearLayout><\/android.widget.FrameLayout><\/android.widget.LinearLayout> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] "false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[0,633][1080,1794]\" resource-id=\"\" instance=\"10\"><\/android.widget.RelativeLayout><\/android.widget.Relativ
    [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] eLayout><\/android.view.ViewGroup><\/android.widget.RelativeLayout><\/android.widget.RelativeLayout><\/android.support.v7.widget.RecyclerView> [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] yout\" package=\"com.baidu.searchbox.lite\" content-desc=\"\" checkable=\"false\" checked=\"false\" clickable=\"false\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[0,660][1080,732]\" resource-id=\"\" instance=\"11\"><\/android.widget.FrameLayout><\/android.view.ViewGroup><\/android.view.ViewGroup><\/android.widget.FrameLayout><\/android.support.v4.view.ViewPager><\/android.widget.LinearLayout><\/android.widget.ScrollView><\/android.widget.FrameLayout> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] tent-desc=\"\" checkable=\"false\" checked=\"false\" clickable=\"false\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[876,96][924,144]\" resource-id=\"com.baidu.searchbox.lite:id\/b6g\" instance=\"6\"\/><\/android.widget.LinearLayout><\/android.widget.RelativeLayout><\/android.widget.LinearLayout><\/android.view.ViewGroup><\/android.widget.FrameLayout><\/android.widget.RelativeLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] bled=\"true\" focusable=\"true\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"true\" bounds=\"[0,1794][231,1920]\" resource-id=\"\" instance=\"15\"><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[AndroidBootstrap][39m Stream still not complete, waiting up to 60000ms for the data to arrive
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] tance=\"18\"><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.TabWidget><\/android.widget.TabHost><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.LinearLayout> [debug] [35m[AndroidBootstrap][39m Received command result from bootstrap
    [debug] [35m[MJSONWP][39m Responding to client with driver.getPageSource() result: " [info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/0ed41a39-7df9-4403-bd66-cf615c0b4380/source [39m[32m200[39m [90m455 ms - 42210[39m
    [info] [35m[HTTP][39m [90m[39m
    [debug] [35m[AndroidBootstrap][39m [UIAUTO STDOUT] ackage=\"com.baidu.searchbox.lite\" content-desc=\"\" checkable=\"false\" checked=\"false\" clickable=\"false\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[450,1418][496,1567]\" resource-id=\"com.baidu.searchbox.lite:id\/anp\" instance=\"15\"\/><\/android.widget.RelativeLayout><\/android.widget.LinearLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/hierarchy>"}[/APPIUM-UIAUTO][info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/0ed41a39-7df9-4403-bd66-cf615c0b4380/screenshot[39m
    [info] [35m[HTTP][39m [90m{}[39m
    [debug] [35m[MJSONWP][39m Calling AppiumDriver.getScreenshot() with args: ["0ed41a39-7df9-4403-bd66-cf615c0b4380"]
    [debug] [35m[ADB][39m Device API level: 23[info] [35m[AndroidDriver][39m Cannot get screenshot data with 'adb exec-out' because of 'Invalid file signature'. Defaulting to 'adb shell' call[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell ls -la /data/local/tmp/screenshot.png'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 pull /data/local/tmp/screenshot.png C:\Users\slg\AppData\Local\Temp\appium12036-4780-1dug442.5bjll.png'[debug] [35m[MJSONWP][39m Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABDgAAAeACAYAAAArYecKAACAAElEQVR4AezBd1zV9eLA/9dZgMgKMYYCMgRBXDlKxCy1oWlmzspyXCVu9m2Z1U1zZN28mpVNc9zEUCp3WurJvbkqqDEOO9koHqaHcw4cPr/f54/z+PHjgYp0XPV+PhXS/wtBEARBEARBEARBEIS7mBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBJBEARBEARBEARBEIS7nBpBEARBEARBuE0qKir47bffSE5Opri4GIPBgFKppE2bNnh5eREREcEjjzyCm5sbjWm1WuLi4ujXrx8vv/wywt2nvLycU6dOkZaWRlpaGl5eXixYsIDWsFgsJCQk0Lt3b+zt7Wnqjz/+ICMjA5PJRLt27ejWrRvOzs4IgvDXokYQBEEQBEH4S3r22WdRKBSMHDmSiRMncicxGo2sW7eOo0ePUl9fT2MNDQ1UV1dTXV1NZmYmv/zyC5GRkbzwwgs4ODig1WqJjY1FkiQSExO50xkMBmSOjo4I/59//etfVFVVYVVVVUVrbdiwgV27dvHpp5/i6emJVW5uLrGxsWRmZqJUKnFwcMBgMODg4MDgwYN57rnnEAThr0ONIAiCIAiC8JclSRI///wzly9fZubMmdwJLly4wLJlyygrK6MlzGYzBw8eJDk5mcjISHbs2IEkSajVaqZNm8adoKGhgQsXLpCSkkJubi7FxcVcvHgRg8FAY46Ojnh6euLl5UVgYCDh4eF06tQJhULBX1FpaSmJiYmkpaWRnp6Ot7c3CxYsQFZVVYUtnD17...
    [info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/0ed41a39-7df9-4403-bd66-cf615c0b4380/screenshot [39m[32m200[39m [90m9190 ms - 1320134[39m
    [info] [35m[HTTP][39m [90m[39m

  • 老师,不好意思没有及时回复您,麻烦您再帮我看一下问题出在哪呗
    添加 uiautomator2 后报错
    {
    "deviceName": "192.168.66.55:5555",
    "platformName": "Android",
    "appPackage": "com.baidu.searchbox.lite",
    "appActivity": "com.baidu.searchbox.SplashActivity",
    "noReset": "true",
    "recreateChromeDriverSessions": "true",
    "udid": "192.168.66.55:5555",
    "\"unicodeKeyboard": "true",
    "resetKeyboard": "true",
    "noSign": "true",
    "automationName": "uiautomator2"
    }
    [info] [35m[Appium][39m Welcome to Appium v1.8.1
    [info] [35m[Appium][39m Non-default server args:
    [info] [35m[Appium][39m address: 127.0.0.1
    [info] [35m[Appium][39m Appium REST http interface listener started on 127.0.0.1:4723[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/sessions[39m
    [info] [35m[HTTP][39m [90m{}[39m
    [debug] [35m[MJSONWP][39m Calling AppiumDriver.getSessions() with args: []
    [debug] [35m[MJSONWP][39m Responding to client with driver.getSessions() result: []
    [info] [35m[HTTP][39m [37m<-- GET /wd/hub/sessions [39m[32m200[39m [90m13 ms - 40[39m
    [info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
    [info] [35m[HTTP][39m [90m{"desiredCapabilities":{"appActivity":"com.baidu.searchbox.SplashActivity","appPackage":"com.baidu.searchbox.lite","automationName":"UIAutomator2","deviceName":"192.168.66.55:5555","noReset":"true","platformName":"Android","recreateChromeDriverSessions":"true","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
    [debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"appActivity":"com.baidu.searchbox.SplashActivity","appPackage":"com.baidu.searchbox.lite","automationName":"UIAutomator2","deviceName":"192.168.66.55:5555","noReset":"true","platformName":"Android","recreateChromeDriverSessions":"true","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
    [debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1586182361842 (22:12:41 GMT+0800 (中国标准时间))
    [info] [35m[Appium][39m Creating new AndroidUiautomator2Driver (v1.12.0) session
    [info] [35m[Appium][39m Capabilities:
    [info] [35m[Appium][39m appActivity: com.baidu.searchbox.SplashActivity
    [info] [35m[Appium][39m appPackage: com.baidu.searchbox.lite
    [info] [35m[Appium][39m automationName: UIAutomator2
    [info] [35m[Appium][39m deviceName: 192.168.66.55:5555
    [info] [35m[Appium][39m noReset: true
    [info] [35m[Appium][39m platformName: Android
    [info] [35m[Appium][39m recreateChromeDriverSessions: true
    [info] [35m[Appium][39m newCommandTimeout: 0
    [info] [35m[Appium][39m connectHardwareKeyboard: true
    [debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {"appActivity":"com.baidu.s...
    [warn] [35m[BaseDriver][39m Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
    [warn] [35m[BaseDriver][39m The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.
    [info] [35m[BaseDriver][39m Session created with session id: ca4a33c8-83dd-40e6-b38c-cd25683a7f76[debug] [35m[AndroidDriver][39m Getting Java version[info] [35m[AndroidDriver][39m Java version is: 1.8.0_121
    [info] [35m[ADB][39m Checking whether adb is present
    [info] [35m[ADB][39m Found 1 'build-tools' folders under 'E:\AppAuto\software\sdk\android-sdk-windows-appium' (newest first):
    [info] [35m[ADB][39m E:/AppAuto/software/sdk/android-sdk-windows-appium/build-tools/28.0.3
    [info] [35m[ADB][39m Using adb.exe from E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe
    [info] [35m[AndroidDriver][39m Retrieving device list
    [debug] [35m[ADB][39m Trying to find a connected android device
    [debug] [35m[ADB][39m Getting connected devices...[debug] [35m[ADB][39m 1 device(s) connected
    [info] [35m[AndroidDriver][39m Using device: 192.168.66.55:5555
    [debug] [35m[ADB][39m Setting device id to 192.168.66.55:5555
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.build.version.sdk'[debug] [35m[ADB][39m Current device property 'ro.build.version.sdk': 23
    [debug] [35m[ADB][39m Device API level: 23
    [warn] [35m[AndroidDriver][39m No app sent in, not parsing package/activity
    [info] [35m[ADB][39m Getting device platform version
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.build.version.release'[debug] [35m[ADB][39m Current device property 'ro.build.version.release': 6.0
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell wm size'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell wm density'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.product.model'[debug] [35m[ADB][39m Current device property 'ro.product.model': Redmi Pro
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell getprop ro.product.manufacturer'[debug] [35m[ADB][39m Current device property 'ro.product.manufacturer': Xiaomi
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell am force-stop io.appium.uiautomator2.server'[debug] [35m[ADB][39m Checking app cert for C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk
    [info] [35m[ADB][39m Using apksigner.bat from E:\AppAuto\software\sdk\android-sdk-windows-appium\build-tools\28.0.3\apksigner.bat
    [debug] [35m[ADB][39m Starting 'E:\AppAuto\software\sdk\android-sdk-windows-appium\build-tools\28.0.3\apksigner.bat' with args 'verify,--print-certs,C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk'[debug] [35m[ADB][39m 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk' is already signed.
    [debug] [35m[ADB][39m Checking app cert for C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
    [debug] [35m[ADB][39m Starting 'E:\AppAuto\software\sdk\android-sdk-windows-appium\build-tools\28.0.3\apksigner.bat' with args 'verify,--print-certs,C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'[debug] [35m[ADB][39m 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already signed.
    [debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell pm list packages io.appium.uiautomator2.server'[debug] [35m[ADB][39m App is installed
    [debug] [35m[ADB][39m Getting package info for 'io.appium.uiautomator2.server'
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell dumpsys package io.appium.uiautomator2.server'[info] [35m[ADB][39m Checking whether aapt is present
    [info] [35m[ADB][39m Using aapt.exe from E:\AppAuto\software\sdk\android-sdk-windows-appium\build-tools\28.0.3\aapt.exe
    [debug] [35m[ADB][39m The installed 'io.appium.uiautomator2.server' package does not require upgrade ('1.12.0' >= '1.12.0')
    [debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server.test
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell pm list packages io.appium.uiautomator2.server.test'[debug] [35m[ADB][39m App is installed
    [debug] [35m[ADB][39m Getting package info for 'io.appium.uiautomator2.server.test'
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell dumpsys package io.appium.uiautomator2.server.test'[warn] [35m[ADB][39m Cannot read version codes of 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'
    [warn] [35m[ADB][39m Cannot read version names of 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' and/or 'io.appium.uiautomator2.server.test'. Assuming correct app version is already installed
    [debug] [35m[UiAutomator2][39m Waiting up to 20000ms for instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' to be available
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell pm list instrumentation'[debug] [35m[UiAutomator2][39m Instrumentation 'io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner' available
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 wait-for-device'
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell echo ping'[debug] [35m[AndroidDriver][39m Pushing settings apk to device...
    [debug] [35m[ADB][39m Getting install status for io.appium.settings
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell pm list packages io.appium.settings'[debug] [35m[ADB][39m App is not installed
    [debug] [35m[ADB][39m App 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk' not installed. Installing
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 install -g 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk''[debug] [35m[ADB][39m Install command stdout: pkg: /data/local/tmp/settings_apk-debug.apk[debug] [35m[ADB][39m Failure [INSTALL_CANCELED_BY_USER]
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell ps'[debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'[warn] [35m[AndroidDriver][39m Failed to launch settings app: Cannot start the 'io.appium.settings' application. Original error: Activity name '.Settings' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell appops set io.appium.settings android:mock_location allow'[warn] [35m[AndroidDriver][39m setDeviceLanguageCountry requires language or country.
    [warn] [35m[AndroidDriver][39m Got language: 'undefined' and country: 'undefined'
    [debug] [35m[Logcat][39m Starting logcat capture[debug] [35m[AndroidDriver][39m Pushing unlock helper app to device...
    [debug] [35m[ADB][39m Getting install status for io.appium.unlock
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell pm list packages io.appium.unlock'[debug] [35m[ADB][39m App is not installed
    [debug] [35m[ADB][39m App 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk' not installed. Installing
    [debug] [35m[ADB][39m Device API level: 23
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 install -g 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk''[debug] [35m[ADB][39m Install command stdout: pkg: /data/local/tmp/unlock_apk-debug.apk[debug] [35m[ADB][39m Failure [INSTALL_CANCELED_BY_USER]
    [debug] [35m[UiAutomator2][39m Forwarding UiAutomator2 Server port 6790 to 8203
    [debug] [35m[ADB][39m Forwarding system: 8203 to device: 6790
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 forward tcp:8203 tcp:6790'[debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell rm -rf /data/local/tmp/strings.json'[debug] [35m[UiAutomator2][39m No app capability. Assuming it is already on the device
    [debug] [35m[ADB][39m Checking app cert for undefined
    [debug] [35m[ADB][39m 'undefined' doesn't exist
    [debug] [35m[ADB][39m Running 'E:\AppAuto\software\sdk\android-sdk-windows-appium\platform-tools\adb.exe -P 5037 -s 192.168.66.55:5555 shell am force-stop io.appium.uiautomator2.server'[info] [35m[UiAutomator2][39m Starting uiautomator2 server 1.12.0
    [info] [35m[UiAutomator2][39m Using UIAutomator2 server from 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v1.12.0.apk' and test from 'C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
    [info] [35m[UiAutomator2][39m Running command: 'adb -s 192.168.66.55:5555 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'
    [info] [35m[UiAutomator2][39m Waiting up to 20000ms for UiAutomator2 to be online...
    [debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8203/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8203/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8203/wd/hub/status] with no body[debug] [35m[JSONWP Proxy][39m Proxying [GET /status] to [GET http://localhost:8203/wd/hub/status] with no body

  • 昨天加上最后两行配置好了,但是今天又出问题了

    我的手机配置是红米 pro Android 6.0
    不加 uiautomator2 启动是正常的




  • 这个问题暂时解决了
    这是我的配置,我加上最后两个配置就可以正常运行,但是不知道原因
    {
    "deviceName": "192.168.1.102:5555",
    "platformName": "Android",
    "appPackage": "com.baidu.searchbox.lite",
    "appActivity": "com.baidu.searchbox.SplashActivity",
    "noReset": "true",
    "automationName": "UIAutomator2",
    "recreateChromeDriverSessions": "true",
    "noSign": "true"
    }