Я получаю приведенную ниже ошибку на сервере APPIUM при автоматизации приложения для Android. Элемент вообще не щелкается после открытия приложения, и я получаю исключение NULL POINTER в Eclipse Я запустил сервер APPIUM и установил нужные возможности. Файл runner настроен с помощью TestNG, и существует соединение между реальным устройством и системой. Не могли бы вы помочь мне с этим?
The server is running
[Appium] Welcome to Appium v1.8.1
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","newCommandTimeout":120,"autoGrantPermissions":"true","platformName":"Android","deviceName":"Android Device","autoAcceptAlerts":"true"},"capabilities":{"alwaysMatch":{"appium:appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appium:appPackage":"com.sampleindia.sample1.views","appium:autoAcceptAlerts":"true","appium:autoGrantPermissions":"true","appium:deviceName":"Android Device","appium:newCommandTimeout":120,"platformName":"android"},"firstMatch":[{}]}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","newCommandTimeout":120,"autoGrantPermissions":"true","platformName":"Android","deviceName":"Android Device","autoAcceptAlerts":"true"},null,{"alwaysMatch":{"appium:appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appium:appPackage":"com.sampleindia.sample1.views","appium:autoAcceptAlerts":"true","appium:autoGrantPermissions":"true","appium:deviceName":"Android Device","appium:newCommandTimeout":120,"platformName":"android"},"firstMatch":[{}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1535772293503 (08:54:53 GMT+0530 (India Standard Time))
[Appium] Creating new AndroidDriver (v2.7.0) session
[Appium] Capabilities:
[Appium] platformName: android
[Appium] appActivity: com.sampleindia.sample1.views.splash.SplashActivity
[Appium] appPackage: com.sampleindia.sample1.views
[Appium] autoAcceptAlerts: true
[Appium] autoGrantPermissions: true
[Appium] deviceName: Android Device
[Appium] newCommandTimeout: 120
[BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities [object Object] were provided
[BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa...
[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.
[BaseDriver] Capability 'autoGrantPermissions' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoAcceptAlerts.
[BaseDriver] Session created with session id: 9f3033a6-9202-4b30-8bcd-e7bf7e706e21
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_171
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[AndroidDriver] Using device: ZY3229LGJH
[ADB] Setting device id to ZY3229LGJH
[AndroidDriver] App file was not listed, instead we're going to run com.sampleindia.sample1.views directly on the device
[AndroidDriver] Checking whether package is present on the device
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell pm list packages com.sampleindia.sample1.views'
[AndroidDriver] Starting Android session
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH wait-for-device'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell pm list packages io.appium.settings'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell dumpsys package io.appium.settings'
[ADB] The installed 'io.appium.settings' package does not require upgrade ('2.3.0' >= '2.3.0')
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell ps'
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 25
[ADB] Device API level: 25
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell appops set io.appium.settings android\:mock_location allow'
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'undefined' and country: 'undefined'
[Logcat] Starting logcat capture
[AndroidDriver] Pushing unlock helper app to device...
[ADB] Getting install status for io.appium.unlock
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell pm list packages io.appium.unlock'
[ADB] App is installed
[ADB] Getting package info for 'io.appium.unlock'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell dumpsys package io.appium.unlock'
[ADB] The installed 'io.appium.unlock' package does not require upgrade ('2.0.0' >= '2.0.0')
[ADB] Getting device platform version
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 7.1.1
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell wm size'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell getprop ro.product.model'
[ADB] Current device property 'ro.product.model': Moto G (5S) Plus
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell getprop ro.product.manufacturer'
[ADB] Current device property 'ro.product.manufacturer': motorola
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] No app capability. Assuming it is already on the device
[ADB] Getting install status for com.sampleindia.sample1.views
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell pm list packages com.sampleindia.sample1.views'
[ADB] App is installed
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell am force-stop com.sampleindia.sample1.views'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell pm clear com.sampleindia.sample1.views'
[ADB] Device API level: 25
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell dumpsys package com.sampleindia.sample1.views'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell pm dump com.sampleindia.sample1.views'
[ADB] Got the following command chunks to execute: pm,grant,com.sampleindia.sample1.views,android.permission.READ_PHONE_STATE,;,pm,grant,com.sampleindia.sample1.views,android.permission.CAMERA,;,pm,grant,com.sampleindia.sample1.views,android.permission.READ_SMS,;,pm,grant,com.sampleindia.sample1.views,android.permission.RECEIVE_SMS,;,pm,grant,com.sampleindia.sample1.views,android.permission.READ_CALENDAR,;,pm,grant,com.sampleindia.sample1.views,android.permission.WRITE_CALENDAR,;,pm,grant,com.sampleindia.sample1.views,android.permission.ACCESS_COARSE_LOCATION,;,pm,grant,com.sampleindia.sample1.views,android.permission.ACCESS_FINE_LOCATION,;,pm,grant,com.sampleindia.sample1.views,android.permission.READ_EXTERNAL_STORAGE,;,pm,grant,com.sampleindia.sample1.views,android.permission.WRITE_EXTERNAL_STORAGE,;
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell pm grant com.sampleindia.sample1.views android.permission.READ_PHONE_STATE \; pm grant com.sampleindia.sample1.views android.permission.CAMERA \; pm grant com.sampleindia.sample1.views android.permission.READ_SMS \; pm grant com.sampleindia.sample1.views android.permission.RECEIVE_SMS \; pm grant com.sampleindia.sample1.views android.permission.READ_CALENDAR \; pm grant com.sampleindia.sample1.views android.permission.WRITE_CALENDAR \; pm grant com.sampleindia.sample1.views android.permission.ACCESS_COARSE_LOCATION \; pm grant com.sampleindia.sample1.views android.permission.ACCESS_FINE_LOCATION \; pm grant com.sampleindia.sample1.views android.permission.READ_EXTERNAL_STORAGE \; pm grant com.sampleindia.sample1.views android.permission.WRITE_EXTERNAL_STORAGE \;'
[AndroidDriver] Performed fast reset on the installed 'com.sampleindia.sample1.views' application (stop and clear)
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH forward tcp\:4724 tcp\:4724'
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state 'starting'
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH push 'C:\\Program Files (x86)\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-android-bootstrap\\bootstrap\\bin\\AppiumBootstrap.jar' /data/local/tmp/'
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell ps'
[ADB] Attempting to kill process 30043
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell kill -0 30043'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell kill 30043'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell kill 30043'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell kill 30043'
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell kill 30043'
[ADB] Cannot kill process 30043 in 1000 ms. Trying to force kill...
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell kill -9 30043'
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","ZY3229LGJH","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.sampleindia.sample1.views","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[UiAutomator] UiAutomator exited unexpectedly with code 4294967177, signal null
[UiAutomator] Moving to state 'stopped'
[AndroidDriver] Shutting down Android driver
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell am force-stop com.sampleindia.sample1.views'
[Appium] Closing session, cause was 'UiAUtomator shut down unexpectedly'
[Appium] Removing session 8fd7d632-a1d8-47bb-842d-c3d4dac0e247 from our master session list
[ADB] Pressing the HOME button
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell input keyevent 3'
[UiAutomator] Moving to state 'online'
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell dumpsys window'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 25
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell am start -W -n com.sampleindia.sample1.views/com.sampleindia.sample1.views.splash.SplashActivity -S'
[AndroidBootstrap] Cannot shut down Android bootstrap; it has already shut down
[Logcat] Stopping logcat capture
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell am force-stop io.appium.unlock'
[AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[Appium] New AndroidDriver session created successfully, session 9f3033a6-9202-4b30-8bcd-e7bf7e706e21 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1535772316920 (08:55:16 GMT+0530 (India Standard Time))
[W3C] 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","appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","autoAcceptAlerts":"true","autoGrantPermissions":true,"deviceName":"Android Device","newCommandTimeout":120},"platformName":"android","appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","autoAcceptAlerts":"true","autoGrantPermissions":true,"deviceName":"ZY3229LGJH","newCommandTimeout":120,"deviceUDID":"ZY3229LGJH","platformVersion":"7.1.1","deviceScreenSize":"1080x1920","deviceModel":"Moto G (5S) Plus","deviceManufacturer":"motorola"}}
[HTTP] <-- POST /wd/hub/session 200 23420 ms - 921
[HTTP]
[HTTP] --> GET /wd/hub/session/9f3033a6-9202-4b30-8bcd-e7bf7e706e21
[HTTP] {}
[W3C] Calling AppiumDriver.getSession() with args: ["9f3033a6-9202-4b30-8bcd-e7bf7e706e21"]
[W3C] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","autoAcceptAlerts":"true","autoGrantPermissions":true,"deviceName":"Android Device","newCommandTimeout":120},"platformName":"android","appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","autoAcceptAlerts":"true","autoGrantPermissions":true,"deviceName":"ZY3229LGJH","newCommandTimeout":120,"deviceUDID":"ZY3229LGJH","platformVersion":"7.1.1","deviceScreenSize":"1080x1920","deviceModel":"Moto G (5S) Plus","deviceManufacturer":"motorola"}
[HTTP] <-- GET /wd/hub/session/9f3033a6-9202-4b30-8bcd-e7bf7e706e21 200 18 ms - 853
[HTTP]
[HTTP] --> GET /wd/hub/session/9f3033a6-9202-4b30-8bcd-e7bf7e706e21
[HTTP] {}
[W3C] Calling AppiumDriver.getSession() with args: ["9f3033a6-9202-4b30-8bcd-e7bf7e706e21"]
[W3C] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","autoAcceptAlerts":"true","autoGrantPermissions":true,"deviceName":"Android Device","newCommandTimeout":120},"platformName":"android","appActivity":"com.sampleindia.sample1.views.splash.SplashActivity","appPackage":"com.sampleindia.sample1.views","autoAcceptAlerts":"true","autoGrantPermissions":true,"deviceName":"ZY3229LGJH","newCommandTimeout":120,"deviceUDID":"ZY3229LGJH","platformVersion":"7.1.1","deviceScreenSize":"1080x1920","deviceModel":"Moto G (5S) Plus","deviceManufacturer":"motorola"}
[HTTP] <-- GET /wd/hub/session/9f3033a6-9202-4b30-8bcd-e7bf7e706e21 200 11 ms - 853
[HTTP]
[HTTP] --> POST /wd/hub/session/9f3033a6-9202-4b30-8bcd-e7bf7e706e21/timeouts
[HTTP] {"implicit":15000}
[W3C] Calling AppiumDriver.timeouts() with args: [{"protocol":"W3C","implicit":15000},"9f3033a6-9202-4b30-8bcd-e7bf7e706e21"]
[BaseDriver] script: undefined, pageLoad: undefined, implicit: 15000
[BaseDriver] Set implicit wait to 15000ms
[W3C] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/9f3033a6-9202-4b30-8bcd-e7bf7e706e21/timeouts 200 10 ms - 14
[HTTP]
[BaseDriver] Shutting down because we waited 120 seconds for a command
[AndroidDriver] Shutting down Android driver
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell am force-stop com.sampleindia.sample1.views'
[Appium] Closing session, cause was 'New Command Timeout of 120 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
[Appium] Removing session 9f3033a6-9202-4b30-8bcd-e7bf7e706e21 from our master session list
[ADB] Pressing the HOME button
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell input keyevent 3'
[AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
[AndroidBootstrap] Received command result from bootstrap
[UiAutomator] Shutting down UiAutomator
[UiAutomator] Moving to state 'stopping'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[AndroidBootstrap] [UIAUTO STDOUT] Time: 125.019
[AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[UiAutomator] UiAutomator shut down normally
[UiAutomator] Moving to state 'stopped'
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell ps'
[ADB] No uiautomator process found to kill, continuing...
[UiAutomator] Moving to state 'stopped'
[Logcat] Stopping logcat capture
[ADB] Running 'C:\Users\VADI\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s ZY3229LGJH shell am force-stop io.appium.unlock'
[AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.