appium - 1.2.2
java bindings - 1.6.2
OS - Windows 7(x64)
Below is the code
DesiredCapabilities capabilities = new DesiredCapabilities();
//capabilities.setCapability(“automationName”, “Appium”);
//capabilities.setCapability(“deviceName”,“Android”);
// capabilities.setCapability(“platformName”,“Android”);
// capabilities.setCapability(CapabilityType.VERSION, “4.4.2”);
// capabilities.setCapability(“appPackage”, “com.android.settings”);
//capabilities.setCapability(“appActivity”, “.Settings”);
capabilities.setCapability("appPackage", "com.vcast.mediamanager");
capabilities.setCapability("appActivity", ".gui.activities.SplashLogoActivity");
// capabilities.setCapability("autoLaunch", "false");
//capabilities.setCapability("app","chrome");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.4.2");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Nexus5");
// capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");
driver = new AppiumDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
DesiredCapabilities capabilities1 = new DesiredCapabilities();
capabilities1.setCapability("appPackage", "com.android.settings");
capabilities1.setCapability("appActivity", ".Settings");
// capabilities.setCapability("autoLaunch", "false");
//capabilities.setCapability("app","chrome");
capabilities1.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities1.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.4.2");
capabilities1.setCapability(MobileCapabilityType.DEVICE_NAME, "Galaxy S4");
driver1 = new AppiumDriver(new URL("http://0.0.0.0:4724/wd/hub"), capabilities);
But same app is launched in both the cases the app launched in driver is launched?
Following is log for appium 4723 driver:
ar -c io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRun
ner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.andro
id.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”
:“wake”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:true,“status”:0}
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window”
info: [debug] Writing dumpsys output to C:\Users\Raghuram\AppData\Roaming\npm\no
de_modules\appium.dumpsys.log
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”
:“getDataDir”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:"/data/local/tmp
“,“status”:0}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Getting device API level
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 19
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “am start -S -a android.intent.act
ion.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.vcast.mediaman
ager/.gui.activities.SplashLogoActivity”
info: [debug] Waiting for pkg “com.vcast.mediamanager” and activity “.gui.activi
ties.SplashLogoActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window windows”
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId 41b692f6-483c-422a-9905-a4ed
f7118800
info: <-- POST /wd/hub/session 303 3851.300 ms - 9
info: --> GET /wd/hub/session/41b692f6-483c-422a-9905-a4edf7118800 {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”
:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.4.2”,“webStorageEnabled”:f
alse,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“ne
tworkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desir
ed”:{“appPackage”:“com.vcast.mediamanager”,“appActivity”:”.gui.activities.Splash
LogoActivity",“platformVersion”:“4.4.2”,“platformName”:“Android”,“deviceName”:“N
exus5”},“appPackage”:“com.vcast.mediamanager”,“appActivity”:".gui.activities.Spl
ashLogoActivity",“platformName”:“Android”,“deviceName”:“Nexus5”},“sessionId”:“41
b692f6-483c-422a-9905-a4edf7118800”}
info: <-- GET /wd/hub/session/41b692f6-483c-422a-9905-a4edf7118800 200 3.945 ms
- 627 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformV
ersion”:“4.4.2”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnab
led”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationConte
xtEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.vcast.mediamanager”,
“appActivity”:".gui.activities.SplashLogoActivity",“platformVersion”:“4.4.2”,“pl
atformName”:“Android”,“deviceName”:“Nexus5”},“appPackage”:“com.vcast.mediamanage
r”,“appActivity”:".gui.activities.SplashLogoActivity",“platformName”:“Android”,"
deviceName":“Nexus5”},“sessionId”:“41b692f6-483c-422a-9905-a4edf7118800”}
info: --> DELETE /wd/hub/session/41b692f6-483c-422a-9905-a4edf7118800 {}
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“OK, shutting down”
,“status”:0}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRun
ner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.andro
id.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 1.898
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessi
onId”:“41b692f6-483c-422a-9905-a4edf7118800”}
info: <-- DELETE /wd/hub/session/41b692f6-483c-422a-9905-a4edf7118800 200 710.18
7 ms - 76 {“status”:0,“value”:null,“sessionId”:“41b692f6-483c-422a-9905-a4edf711
8800”}
info: --> POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.vcast.m
ediamanager”,“appActivity”:".gui.activities.SplashLogoActivity","platformVersion
":“4.4.2”,“platformName”:“Android”,“deviceName”:“Nexus5”}}
info: [debug] Didn’t get app but did get Android package, will attempt to launch
it on the device
info: [debug] Creating new appium session ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765
info: Starting android appium
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s alr
eady on the device
info: [debug] Checking whether adb is present
info: [debug] Using adb from E:\Automation\MobileAutomation\adt\adt-bundle\sdk\p
latform-tools\adb.exe
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” devices
info: [debug] 2 device(s) connected
info: Found device 077c35ee0ade546b
info: [debug] Setting device id to 077c35ee0ade546b
info: [debug] Waiting for device to be ready and to respond to shell commands (t
imeout = 5)
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b wait-for-device
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “echo ‘ready’”
info: [debug] Starting logcat capture
warn: No app capability, can’t parse package/activity
info: [debug] Getting device API level
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 19
info: Device API level is: 19
info: [debug] Apk doesn’t exist locally
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “rm -rf /data/local/tmp/strings.js
on”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an ap
p path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b push “C:\Users\Raghuram\AppData\Roam
ing\npm\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /
data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b install “C:\Users\Raghuram\AppData\Roami
ng\npm\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b install “C:\Users\Raghuram\AppData\Roami
ng\npm\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: E:\Automation\MobileAutomation\adt\adt-bundle\sdk\platfo
rm-tools\adb.exe -s 077c35ee0ade546b shell uiautomator runtest AppiumBootstrap.j
ar -c io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRun
ner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.andro
id.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”
:“wake”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:true,“status”:0}
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window”
info: [debug] Writing dumpsys output to C:\Users\Raghuram\AppData\Roaming\npm\no
de_modules\appium.dumpsys.log
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”
:“getDataDir”,“params”:{}}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Getting device API level
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “getprop ro.build.version.sdk”
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:"/data/local/tmp
“,“status”:0}
info: [debug] Device is at API Level 19
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “am start -S -a android.intent.act
ion.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.vcast.mediaman
ager/.gui.activities.SplashLogoActivity”
info: [debug] Waiting for pkg “com.vcast.mediamanager” and activity “.gui.activi
ties.SplashLogoActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window windows”
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId ea8cf1c0-d9a9-4dfa-bf18-fcef
253ae765
info: <-- POST /wd/hub/session 303 3996.987 ms - 9
info: --> GET /wd/hub/session/ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765 {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”
:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.4.2”,“webStorageEnabled”:f
alse,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“ne
tworkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desir
ed”:{“appPackage”:“com.vcast.mediamanager”,“appActivity”:”.gui.activities.Splash
LogoActivity",“platformVersion”:“4.4.2”,“platformName”:“Android”,“deviceName”:“N
exus5”},“appPackage”:“com.vcast.mediamanager”,“appActivity”:".gui.activities.Spl
ashLogoActivity",“platformName”:“Android”,“deviceName”:“Nexus5”},“sessionId”:“ea
8cf1c0-d9a9-4dfa-bf18-fcef253ae765”}
info: <-- GET /wd/hub/session/ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765 200 1.960 ms
- 627 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformV
ersion”:“4.4.2”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnab
led”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationConte
xtEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.vcast.mediamanager”,
“appActivity”:".gui.activities.SplashLogoActivity",“platformVersion”:“4.4.2”,“pl
atformName”:“Android”,“deviceName”:“Nexus5”},“appPackage”:“com.vcast.mediamanage
r”,“appActivity”:".gui.activities.SplashLogoActivity",“platformName”:“Android”,"
deviceName":“Nexus5”},“sessionId”:“ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765”}
info: [debug] UiAutomator exited
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “echo ‘ping’”
info: [debug] Attempting to uninstall app
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Cleaning up Chromedriver
error: Unhandled error: TypeError: Object function () { [native code] } has no m
ethod ‘stop’
at androidHybrid.cleanupChromedriver (C:\Users\Raghuram\AppData\Roaming\npm
node_modules\appium\lib\devices\android\android-hybrid.js:198:18)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:186:10)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:208:9)
at androidCommon.uninstallApp (C:\Users\Raghuram\AppData\Roaming\npm\node_mo
dules\appium\lib\devices\android\android-common.js:465:5)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:206:12)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:215:11)
at C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\node_modules\ap
pium-adb\lib\adb.js:902:7
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\node_modules\appium-adb\lib\adb.js:173:9)
at ChildProcess.exithandler (child_process.js:646:7)
at ChildProcess.emit (events.js:98:17) context: [POST /wd/hub/session {“desi
redCapabilities”:{“appPackage”:“com.vcast.mediamanager”,“appActivity”:".gui.acti
vities.SplashLogoActivity",“platformVersion”:“4.4.2”,“platformName”:“Android”,“d
eviceName”:“Nexus5”}}]
info: --> GET /wd/hub/session/ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765/source {}
info: [debug] Pushing command to appium work queue: [“source”,{}]
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:"
An unknown server-side error occurred while processing the command.",“origValue”
:“Tried to send command to non-existent Android socket, maybe it’s shutting down
?”},“sessionId”:“ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765”}
info: <-- GET /wd/hub/session/ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765/source 500 3.
246 ms - 248
info: --> DELETE /wd/hub/session/ea8cf1c0-d9a9-4dfa-bf18-fcef253ae765 {}
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] Didn’t get a new command in 60 secs, shutting down…
info: Shutting down appium session
info: [debug] Already in process of shutting down.
info: [debug] Cleaning up appium session
info: [debug] We shut down because no new commands came in
Following is the log for appium 4724 driver1:
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window”
info: [debug] Writing dumpsys output to C:\Users\Raghuram\AppData\Roaming\npm\no
de_modules\appium.dumpsys.log
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”
:“getDataDir”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:"/data/local/tmp
“,“status”:0}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Getting device API level
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 19
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “am start -S -a android.intent.act
ion.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.vcast.mediaman
ager/.gui.activities.SplashLogoActivity”
info: [debug] Waiting for pkg “com.vcast.mediamanager” and activity “.gui.activi
ties.SplashLogoActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window windows”
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId e60d3023-50c8-4084-be78-10d5
4e34a906
info: <-- POST /wd/hub/session 303 3902.020 ms - 9
info: --> GET /wd/hub/session/e60d3023-50c8-4084-be78-10d54e34a906 {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”
:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.4.2”,“webStorageEnabled”:f
alse,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“ne
tworkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desir
ed”:{“appPackage”:“com.vcast.mediamanager”,“appActivity”:”.gui.activities.Splash
LogoActivity",“platformVersion”:“4.4.2”,“platformName”:“Android”,“deviceName”:“N
exus5”},“appPackage”:“com.vcast.mediamanager”,“appActivity”:".gui.activities.Spl
ashLogoActivity",“platformName”:“Android”,“deviceName”:“Nexus5”},“sessionId”:“e6
0d3023-50c8-4084-be78-10d54e34a906”}
info: <-- GET /wd/hub/session/e60d3023-50c8-4084-be78-10d54e34a906 200 5.769 ms
- 627 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformV
ersion”:“4.4.2”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnab
led”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationConte
xtEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.vcast.mediamanager”,
“appActivity”:".gui.activities.SplashLogoActivity",“platformVersion”:“4.4.2”,“pl
atformName”:“Android”,“deviceName”:“Nexus5”},“appPackage”:“com.vcast.mediamanage
r”,“appActivity”:".gui.activities.SplashLogoActivity",“platformName”:“Android”,"
deviceName":“Nexus5”},“sessionId”:“e60d3023-50c8-4084-be78-10d54e34a906”}
info: [debug] UiAutomator exited
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “echo ‘ping’”
info: [debug] Attempting to uninstall app
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Cleaning up Chromedriver
error: Unhandled error: TypeError: Object function () { [native code] } has no m
ethod ‘stop’
at androidHybrid.cleanupChromedriver (C:\Users\Raghuram\AppData\Roaming\npm
node_modules\appium\lib\devices\android\android-hybrid.js:198:18)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:186:10)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:208:9)
at androidCommon.uninstallApp (C:\Users\Raghuram\AppData\Roaming\npm\node_mo
dules\appium\lib\devices\android\android-common.js:465:5)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:206:12)
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\lib\devices\android\android.js:215:11)
at C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\node_modules\ap
pium-adb\lib\adb.js:902:7
at null. (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appi
um\node_modules\appium-adb\lib\adb.js:173:9)
at ChildProcess.exithandler (child_process.js:646:7)
at ChildProcess.emit (events.js:98:17) context: [POST /wd/hub/session {“desi
redCapabilities”:{“appPackage”:“com.vcast.mediamanager”,“appActivity”:".gui.acti
vities.SplashLogoActivity",“platformVersion”:“4.4.2”,“platformName”:“Android”,“d
eviceName”:“Nexus5”}}]
info: --> POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.vcast.m
ediamanager”,“appActivity”:".gui.activities.SplashLogoActivity",“platformVersion
“:“4.4.2”,“platformName”:“Android”,“deviceName”:“Nexus5”}}
error: Failed to start an Appium session, err was: Error: Requested a new sessio
n but one was in progress
info: [debug] Error: Requested a new session but one was in progress
at Appium.start (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\l
ib\appium.js:115:15)
at Object.exports.createSession [as handle] (C:\Users\Raghuram\AppData\Roami
ng\npm\node_modules\appium\lib\server\controller.js:159:16)
at next_layer (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\nod
e_modules\express\lib\router\route.js:113:13)
at Route.dispatch (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium
\node_modules\express\lib\router\route.js:117:5)
at C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\node_modules\ex
press\lib\router\index.js:222:24
at Function.proto.process_params (C:\Users\Raghuram\AppData\Roaming\npm\node
_modules\appium\node_modules\express\lib\router\index.js:288:12)
at next (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\node_modu
les\express\lib\router\index.js:216:19)
at next (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\node_modu
les\express\lib\router\index.js:180:38)
at next (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\node_modu
les\express\lib\router\index.js:180:38)
at next (C:\Users\Raghuram\AppData\Roaming\npm\node_modules\appium\node_modu
les\express\lib\router\index.js:180:38)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:”
A new session could not be created. (Original error: Requested a new session but
one was in progress)”,“origValue”:“Requested a new session but one was in progr
ess”},“sessionId”:“e60d3023-50c8-4084-be78-10d54e34a906”}
info: <-- POST /wd/hub/session 500 4.452 ms - 250
info: [debug] Didn’t get a new command in 60 secs, shutting down…
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
^CTerminate batch job (Y/N)? y
C:\Users\Raghuram>appium --port 4724
info: Welcome to Appium v1.2.2 (REV cf6ff5939ddc6b4d45fcbabfbfe13c950e0058c4)
info: Appium REST http interface listener started on 0.0.0.0:4724
info: [debug] Non-default server args: {“port”:4724}
info: LogLevel: debug
info: --> POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“com.vcast.m
ediamanager”,“appActivity”:".gui.activities.SplashLogoActivity","platformVersion
":“4.4.2”,“platformName”:“Android”,“deviceName”:“Nexus5”}}
info: [debug] Didn’t get app but did get Android package, will attempt to launch
it on the device
info: [debug] Creating new appium session c83505c2-d4ac-4a38-9c76-5d3b85cf7f48
info: Starting android appium
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s alr
eady on the device
info: [debug] Checking whether adb is present
info: [debug] Using adb from E:\Automation\MobileAutomation\adt\adt-bundle\sdk\p
latform-tools\adb.exe
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” devices
info: [debug] 2 device(s) connected
info: Found device 077c35ee0ade546b
info: [debug] Setting device id to 077c35ee0ade546b
info: [debug] Waiting for device to be ready and to respond to shell commands (t
imeout = 5)
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b wait-for-device
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “echo ‘ready’”
info: [debug] Starting logcat capture
warn: No app capability, can’t parse package/activity
info: [debug] Getting device API level
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 19
info: Device API level is: 19
info: [debug] Apk doesn’t exist locally
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “rm -rf /data/local/tmp/strings.js
on”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an ap
p path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b push “C:\Users\Raghuram\AppData\Roam
ing\npm\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /
data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b install “C:\Users\Raghuram\AppData\Roami
ng\npm\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b install “C:\Users\Raghuram\AppData\Roami
ng\npm\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “ps ‘uiautomator’”
info: [debug] Attempting to kill process 4300
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “kill 4300”
info: [debug] Running bootstrap
info: [debug] spawning: E:\Automation\MobileAutomation\adt\adt-bundle\sdk\platfo
rm-tools\adb.exe -s 077c35ee0ade546b shell uiautomator runtest AppiumBootstrap.j
ar -c io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRun
ner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.andro
id.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”
:“wake”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:true,“status”:0}
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window”
info: [debug] Writing dumpsys output to C:\Users\Raghuram\AppData\Roaming\npm\no
de_modules\appium.dumpsys.log
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”
:“getDataDir”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:"/data/local/tmp
“,“status”:0}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Getting device API level
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 19
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “am start -S -a android.intent.act
ion.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.vcast.mediaman
ager/.gui.activities.SplashLogoActivity”
info: [debug] Waiting for pkg “com.vcast.mediamanager” and activity “.gui.activi
ties.SplashLogoActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “dumpsys window windows”
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId c83505c2-d4ac-4a38-9c76-5d3b
85cf7f48
info: <-- POST /wd/hub/session 303 4047.754 ms - 9
info: --> GET /wd/hub/session/c83505c2-d4ac-4a38-9c76-5d3b85cf7f48 {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”
:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.4.2”,“webStorageEnabled”:f
alse,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“ne
tworkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desir
ed”:{“appPackage”:“com.vcast.mediamanager”,“appActivity”:”.gui.activities.Splash
LogoActivity",“platformVersion”:“4.4.2”,“platformName”:“Android”,“deviceName”:“N
exus5”},“appPackage”:“com.vcast.mediamanager”,“appActivity”:".gui.activities.Spl
ashLogoActivity",“platformName”:“Android”,“deviceName”:“Nexus5”},“sessionId”:“c8
3505c2-d4ac-4a38-9c76-5d3b85cf7f48”}
info: <-- GET /wd/hub/session/c83505c2-d4ac-4a38-9c76-5d3b85cf7f48 200 6.061 ms
- 627 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformV
ersion”:“4.4.2”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnab
led”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationConte
xtEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“com.vcast.mediamanager”,
“appActivity”:".gui.activities.SplashLogoActivity",“platformVersion”:“4.4.2”,“pl
atformName”:“Android”,“deviceName”:“Nexus5”},“appPackage”:“com.vcast.mediamanage
r”,“appActivity”:".gui.activities.SplashLogoActivity",“platformName”:“Android”,"
deviceName":“Nexus5”},“sessionId”:“c83505c2-d4ac-4a38-9c76-5d3b85cf7f48”}
info: [debug] Didn’t get a new command in 60 secs, shutting down…
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing: “E:\Automation\MobileAutomation\adt\adt-bundle\sdk\plat
form-tools\adb.exe” -s 077c35ee0ade546b shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“OK, shutting down”
,“status”:0}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRun
ner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.andro
id.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 62.058
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] We shut down because no new commands came in