Appium: Appium chrome driver doesn't start with android

Created on 23 Nov 2017  Â·  3Comments  Â·  Source: appium/appium

The problem

Appium chrome driver doesn't start with android

Environment

  • Appium version: 1.7.1
  • Desktop OS/version used to run Appium: Windows
  • Mobile platform/version under test: Android 7.1.1
  • Real device or emulator/simulator: emulator
  • Appium CLI or Appium.app|exe: Appium.exe

Details

I use Appium + Behat + Mink. I try to get page's HTML with

$this->getSession()->getPage()->getContent();

On MacOS + iOS emulator + safari everything is ok and I get my HTML, but on Android I get some strange XML:

<?xml version="1.0" encoding="UTF-8"?> <hierarchy rotation="0"> <android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.android.chrome" 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,0][1080,1794]" resource-id="" instance="0">

It seems to me that the problem is that Appium chrome driver doesn't start.

Link to Appium logs

[Appium] Welcome to Appium v1.7.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"remote","version":"9","platform":"ANY","browserVersion":"9","browser":"firefox","name":"Behat feature suite","deviceOrientation":"portrait","deviceType":"tablet","selenium-version":"2.31.0","tags":["NIKONOVA_A","PHP 5.6.30"],"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Main","platformName":"Android","platformVersion":"7.1.1","deviceName":"Android Emulator","chromedriverExecutable":null,"marionette":false,"ignoreZoomSetting":false,"automationName":"Appium"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"remote","version":"9","platform":"ANY","browserVersion":"9","browser":"firefox","name":"Behat feature suite","deviceOrientation":"portrait","deviceType":"tablet","selenium-version":"2.31.0","tags":["NIKONOVA_A","PHP 5.6.30"],"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Main","platformName":"Android","platformVersion":"7.1.1","deviceName":"Android Emulator","chromedriverExecutable":null,"marionette":false,"ignoreZoomSetting":false,"automationName":"Appium"},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1511428634970 (14:17:14 GMT+0500 (RTZ 4 (зима)))
[Appium] Creating new AndroidDriver (v1.28.1) session
[Appium] Capabilities:
[Appium]   browserName: 'remote'
[Appium]   version: '9'
[Appium]   platform: 'ANY'
[Appium]   browserVersion: '9'
[Appium]   browser: 'firefox'
[Appium]   name: 'Behat feature suite'
[Appium]   deviceOrientation: 'portrait'
[Appium]   deviceType: 'tablet'
[Appium]   selenium-version: '2.31.0'
[Appium]   tags: [ 'NIKONOVA_A', 'PHP 5.6.30' ]
[Appium]   appPackage: 'com.android.chrome'
[Appium]   appActivity: 'com.google.android.apps.chrome.Main'
[Appium]   platformName: 'Android'
[Appium]   platformVersion: '7.1.1'
[Appium]   deviceName: 'Android Emulator'
[Appium]   chromedriverExecutable: null
[Appium]   marionette: false
[Appium]   ignoreZoomSetting: false
[Appium]   automationName: 'Appium'
[BaseDriver] The following capabilities were provided, but are not recognized by appium: version, platform, browserVersion, browser, name, deviceOrientation, deviceType, selenium-version, tags, marionette, ignoreZoomSetting.
[BaseDriver] Session created with session id: 8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_40
[ADB] Checking whether adb is present
[ADB] Using adb.exe from C:\Android\sdk\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[AndroidDriver] Looking for a device with Android '7.1.1'
[ADB] Setting device id to emulator-5554
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 7.1.1
[AndroidDriver] Using device: emulator-5554
[ADB] Checking whether adb is present
[ADB] Using adb.exe from C:\Android\sdk\platform-tools\adb.exe
[ADB] Setting device id to emulator-5554
[AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
[AndroidDriver] Checking whether package is present on the device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","com.android.chrome"]
[AndroidDriver] Starting Android session
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","wait-for-device"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","echo","ping"]
[Logcat] Starting logcat capture
[AndroidDriver] Pushing settings apk to device...
[ADB] Uninstalling and re-installing 'io.appium.settings'
[ADB] Uninstalling io.appium.settings
[ADB] Getting install status for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","io.appium.settings"]
[ADB] App is installed
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","am","force-stop","io.appium.settings"]
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","uninstall","io.appium.settings"]
[ADB] ADB command output: Success
[ADB] io.appium.settings was successfully uninstalled
[ADB] Getting install status for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","pm","list","packages","io.appium.settings"]
[ADB] App is not installed
[ADB] App 'C:\Users\Admin\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk' not installed. Installing
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","install","C:\\Users\\Admin\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\io.appium.settings\\app\\build\\outputs\\apk\\settings_apk-debug.apk"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.sdk"]
[ADB] Current device property 'ro.build.version.sdk': 25
[ADB] Device API level: 25
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","package","io.appium.settings"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","pm","dump","io.appium.settings"]
[ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.READ_PHONE_STATE,;,pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.ACCESS_FINE_LOCATION,;,pm,grant,io.appium.settings,android.permission.ACCESS_COARSE_LOCATION,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;,pm,grant,io.appium.settings,android.permission.SET_ANIMATION_SCALE,;
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","pm","grant","io.appium.settings","android.permission.READ_PHONE_STATE",";","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.ACCESS_FINE_LOCATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_COARSE_LOCATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";","pm","grant","io.appium.settings","android.permission.SET_ANIMATION_SCALE",";"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[ADB] Device API level: 25
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","am","start","-W","-n","io.appium.settings/.Settings","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[ADB] Device API level: 25
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[AndroidDriver] Pushing unlock helper app to device...
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","install","C:\\Users\\Admin\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-unlock\\bin\\unlock_apk-debug.apk"]
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","install","C:\\Users\\Admin\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-unlock\\bin\\unlock_apk-debug.apk"]
[ADB] Application 'C:\Users\Admin\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-unlock\bin\unlock_apk-debug.apk' already installed. Continuing.
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 7.1.1
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","wm","size"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.model"]
[ADB] Current device property 'ro.product.model': Android SDK built for x86
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","getprop","ro.product.manufacturer"]
[ADB] Current device property 'ro.product.manufacturer': unknown
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] No app capability. Assuming it is already on the device
[AndroidDriver] Running fast reset (stop and clear)
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","am","force-stop","com.android.chrome"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","pm","clear","com.android.chrome"]
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","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:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","push","C:\\Users\\Admin\\AppData\\Local\\Programs\\appium-desktop\\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] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.android.chrome","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[UiAutomator] Moving to state 'online'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Getting connected devices...
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","dumpsys","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 25
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","am","start","-W","-n","com.android.chrome/com.google.android.apps.chrome.Main","-S"]
[Appium] New AndroidDriver session created successfully, session 8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1511428650629 (14:17:30 GMT+0500 (RTZ 4 (зима)))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"ANY","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"remote","version":"9","platform":"ANY","browserVersion":"9","browser":"firefox","name":"Behat feature suite","deviceOrientation":"portrait","deviceType":"tablet","selenium-version":"2.31.0","tags":["NIKONOVA_A","PHP 5.6.30"],"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Main","platformName":"Android","platformVersion":"7.1.1","deviceName":"Android Emulator","chromedriverExecutable":null,"marionette":false,"ignoreZoomSetting":false,"automationName":"Appium"},"browserName":"remote","version":"9","browserVersion":"9","browser":"firefox","name":"Behat feature suite","deviceOrientation":"portrait","deviceType":"tablet","selenium-version":"2.31.0","tags":["NIKONOVA_A","PHP 5.6.30"],"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Mai...
[HTTP] <-- POST /wd/hub/session 200 15668 ms - 1410 
[HTTP] --> POST /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe/url {"url":"http://demo.arnica.pro/"}
[MJSONWP] Calling AppiumDriver.setUrl() with args: ["http://demo.arnica.pro/","8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","am","start","-W","-a","android.intent.action.VIEW","-d","http://demo.arnica.pro/","com.android.chrome"]
[MJSONWP] Responding to client with driver.setUrl() result: null
[HTTP] <-- POST /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe/url 200 2777 ms - 76 
[HTTP] --> GET /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe/source {}
[MJSONWP] Calling AppiumDriver.getPageSource() with args: ["8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe"]
[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"source","params":{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"source","params":{}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: source
[AndroidBootstrap] [UIAUTO STDOUT] [APPIUM-UIAUTO] [debug] Returning result: {"status":0,"value":"<\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT] false\" checked=\"false\" clickable=\"false\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[0,336][1080,1794]\" resource-id=\"\" instance=\"9\"><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT] e\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[49,1504][123,1538]\" resource-id=\"\" instance=\"30\"\/><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT]  selected=\"false\" bounds=\"[152,375][679,485]\" resource-id=\"\" instance=\"51\"><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT] " selected=\"false\" bounds=\"[157,2071][672,1941]\" resource-id=\"\" instance=\"88\"\/><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT] =\"false\" checked=\"false\" clickable=\"true\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[170,2184][653,1941]\" resource-id=\"\" instance=\"109\"\/><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT] se\" selected=\"false\" bounds=\"[695,1441][924,1483]\" resource-id=\"\" instance=\"129\"\/><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT] package=\"com.android.chrome\" content-desc=\"удалить\" checkable=\"false\" checked=\"false\" clickable=\"true\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[682,795][685,795]\" resource-id=\"\" instance=\"150\"\/><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View>
[AndroidBootstrap] [UIAUTO STDOUT] ble=\"true\" enabled=\"true\" focusable=\"false\" focused=\"false\" scrollable=\"false\" long-clickable=\"false\" password=\"false\" selected=\"false\" bounds=\"[1220,653][1449,695]\" resource-id=\"\" instance=\"170\"\/><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.view.View><\/android.webkit.WebView><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.view.ViewGroup><\/android.widget.LinearLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.LinearLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.FrameLayout><\/android.widget.LinearLayout><\/android.widget.FrameLayout><\/hierarchy>"}[/APPIUM-UIAUTO]
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Stream still not complete, waiting
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Stream still not complete, waiting
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Stream still not complete, waiting
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Stream still not complete, waiting
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Stream still not complete, waiting
[AndroidBootstrap] Received command result from bootstrap
[AndroidBootstrap] Stream still not complete, waiting
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.getPageSource() result: "
[HTTP] <-- GET /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe/source 200 619 ms - 110501 
[HTTP] --> POST /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe/elements {"using":"xpath","value":"//html//*[text()[.='23']]"}
[MJSONWP] Calling AppiumDriver.findElements() with args: ["xpath","//html//*[text()[.='23']]","8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe"]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 0 ms for condition
[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//html//*[text()[.='23']]","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//html//*[text()[.='23']]","context":"","multiple":true}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//html//*[text()[.='23']]' using 'XPATH' with the contextId: '' multiple: true
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//html//*[text()[.='23']]' using 'XPATH' with the contextId: '' multiple: true
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":[]}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElements() result: []
[HTTP] <-- POST /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe/elements 200 726 ms - 74 
[HTTP] --> DELETE /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe {}
[MJSONWP] Calling AppiumDriver.deleteSession() with args: ["8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe"]
[BaseDriver] Event 'quitSessionRequested' logged at 1511428694964 (14:18:14 GMT+0500 (RTZ 4 (зима)))
[Appium] Removing session 8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe from our master session list
[AndroidDriver] Shutting down Android driver
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","am","force-stop","com.android.chrome"]
[ADB] Pressing the HOME button
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","input","keyevent",3]
[AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[AndroidBootstrap] Received command result from bootstrap
[UiAutomator] Shutting down UiAutomator
[UiAutomator] Moving to state 'stopping'
[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] [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: 49.298
[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] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[UiAutomator] Moving to state 'stopped'
[Logcat] Stopping logcat capture
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Android\sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","emulator-5554","shell","am","force-stop","io.appium.unlock"]
[AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[BaseDriver] Event 'quitSessionFinished' logged at 1511428698578 (14:18:18 GMT+0500 (RTZ 4 (зима)))
[MJSONWP] Received response: null
[MJSONWP] But deleting session, so not returning
[MJSONWP] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/8c40e5a9-01bf-4d2e-a1e0-2efd55c28afe 200 3616 ms - 76 

Code To Reproduce Issue [ Good To Have ]

My behat.yml:

default:
  extensions:
    Behat\MinkExtension:
      base_url:  'http://demo.arnica.pro/'
      javascript_session:  'foo'
      sessions:
        foo:
          appium:
            capabilities:
              appPackage: 'com.android.chrome'
              appActivity: 'com.google.android.apps.chrome.Main'
              browserName: 'Chrome'
              platformName: "Android"
              platformVersion: "7.1.1"
              deviceName: "Android Emulator"
Android NotABug

Most helpful comment

[Appium] browserName: 'remote'
[Appium] version: '9'
[Appium] platform: 'ANY'
[Appium] browserVersion: '9'
[Appium] browser: 'firefox'
[Appium] name: 'Behat feature suite'
[Appium] deviceOrientation: 'portrait'
[Appium] deviceType: 'tablet'
[Appium] selenium-version: '2.31.0'
[Appium] tags: [ 'NIKONOVA_A', 'PHP 5.6.30' ]
[Appium] appPackage: 'com.android.chrome'
[Appium] appActivity: 'com.google.android.apps.chrome.Main'
[Appium] platformName: 'Android'
[Appium] platformVersion: '7.1.1'
[Appium] deviceName: 'Android Emulator'
[Appium] chromedriverExecutable: null
[Appium] marionette: false
[Appium] ignoreZoomSetting: false
[Appium] automationName: 'Appium'

I see total mess in these capabilities. You need to only set browserName capability to chrome. appPackage, appActivity, chromedriverExecutable: null and most of the stuff there is redundant. also, use avd capability instead of deviceName if you use emulator to run automated tests.

All 3 comments

[Appium] browserName: 'remote'
[Appium] version: '9'
[Appium] platform: 'ANY'
[Appium] browserVersion: '9'
[Appium] browser: 'firefox'
[Appium] name: 'Behat feature suite'
[Appium] deviceOrientation: 'portrait'
[Appium] deviceType: 'tablet'
[Appium] selenium-version: '2.31.0'
[Appium] tags: [ 'NIKONOVA_A', 'PHP 5.6.30' ]
[Appium] appPackage: 'com.android.chrome'
[Appium] appActivity: 'com.google.android.apps.chrome.Main'
[Appium] platformName: 'Android'
[Appium] platformVersion: '7.1.1'
[Appium] deviceName: 'Android Emulator'
[Appium] chromedriverExecutable: null
[Appium] marionette: false
[Appium] ignoreZoomSetting: false
[Appium] automationName: 'Appium'

I see total mess in these capabilities. You need to only set browserName capability to chrome. appPackage, appActivity, chromedriverExecutable: null and most of the stuff there is redundant. also, use avd capability instead of deviceName if you use emulator to run automated tests.

@mykola-mokhnach Thanks for the help, it work :)

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings