Trying to Automate a hybrid app. I have seem several open issues regarding hybrid app but could not find any solution. I have included the Java Code, Appium log and Eclipse error stack below :
Java Code :
import io.appium.java_client.android.AndroidDriver;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
public class hybridapp {
public static AndroidDriver driver;
public static void main(String[] args) throws MalformedURLException, InterruptedException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("deviceName","Android");
capabilities.setCapability("platformVersion", "5.0.1");
capabilities.setCapability("platformName","Android");
// capabilities.setCapability("appPackage", "com.emn8.mobileem8.nativeapp.bk");
//capabilities.setCapability("appActivity", "com.testfairy.sdk.activities.WelcomeActivity");
capabilities.setCapability("app","C:\\Users\\bkbc011\\Desktop\\apk\\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.findElement(By.id("android:id/button1")).click();
Thread.sleep(15000);
Set<String> contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
System.out.println(contextNames); //prints out something like NATIVE_APP \n WEBVIEW_1
}
driver.context((String) contextNames.toArray()[1]); // set context to WEBVIEW_1
/*System.out.println(" it is:"+driver.findElement(By.className(âandroid.view.Viewâ)).getTagName());
Set<String> contextNames = driver.getContextHandles();
for (String contextName : contextNames) {
System.out.println(contextName);
if (contextName.contains("WEBVIEW")){
driver.context(contextName);;
Thread.sleep(10000);
}*/
driver.findElement(By.className("x-input-text")).getSize();
//driver.findElement(By.className("x-component intro-slide-close x-fit-item")).getSize();
//driver.quit();
}
}
Appium Log:
Killed Node Server.
Node Server Process Ended
Starting Node Server
info: Welcome to Appium v1.3.4 (REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {âappâ:âC:\Users\bkbc011\Desktop\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy.apkâ,âaddressâ:â127.0.0.1â,âlogNoColorsâ:true,âandroidPackageâ:âcom.emn8.mobilem8.nativeapp.bkâ,âandroidActivityâ:âcom.testfairy.sdk.activities.WelcomeActivityâ,âdeviceNameâ:âNexus4â,âplatformNameâ:âAndroidâ,âplatformVersionâ:â19â,âautomationNameâ:âAppiumâ,âlanguageâ:âenâ}
info: Console LogLevel: debug
info: â POST /wd/hub/session {âdesiredCapabilitiesâ:{âappâ:âC:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apkâ,âplatformVersionâ:â5.0.1â,âbrowserNameâ:ââ,âplatformNameâ:âAndroidâ,âdeviceNameâ:âAndroidâ}}
info: Client User-Agent string: Apache-HttpClient/4.3.4 (java 1.5)
info: [debug] Using local app from desired caps: C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk
info: [debug] Creating new appium session f73e9a59-954a-44d3-960f-653afb851e47
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_31
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe shell âgetprop persist.sys.languageâ
info: [debug] Current device persist.sys.language: en
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe shell âgetprop persist.sys.countryâ
info: [debug] Current device persist.sys.country: US
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devicesâŚ
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device 0506931ad84a9331
info: [debug] Setting device id to 0506931ad84a9331
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 wait-for-device
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âecho âreadyââ
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âgetprop ro.build.version.sdkâ
info: [debug] Device is at API Level 21
info: Device API level is: 21
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âgetprop persist.sys.languageâ
info: [debug] Current device persist.sys.language: en
info: [debug] java -jar âC:\Appium\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jarâ âstringsFromApkâ âC:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apkâ âC:\Users\bkbc011\AppData\Local\Temp\com.emn8.mobilem8.nativeapp.bkâ en
info: [debug] No strings.xml for language âenâ, getting default strings.xml
info: [debug] java -jar âC:\Appium\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jarâ âstringsFromApkâ âC:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apkâ âC:\Users\bkbc011\AppData\Local\Temp\com.emn8.mobilem8.nativeapp.bkâ
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 push âC:\Users\bkbc011\AppData\Local\Temp\com.emn8.mobilem8.nativeapp.bk\strings.jsonâ /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Users\bkbc011\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe dump xmltree C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk AndroidManifest.xml
info: [debug] Set app process to: com.emn8.mobilem8.nativeapp.bk
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk.
info: [debug] executing cmd: java -jar C:\Appium\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk
info: [debug] App already signed.
info: [debug] Zip-aligning C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\Users\bkbc011\AppData\Local\Android\sdk\build-tools\21.1.2\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\build-tools\21.1.2\zipalign.exe -f 4 C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk C:\Users\bkbc011\AppData\Local\Temp\appium115113-7692-79584f.tmp
info: [debug] MD5 for app is 9c31ecc1860732573f4f262a606f84c8
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âls /data/local/tmp/9c31ecc1860732573f4f262a606f84c8.apkâ
info: [debug] Getting install status for com.emn8.mobilem8.nativeapp.bk
info: [debug] Getting device API level
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âgetprop ro.build.version.sdkâ
info: [debug] Device is at API Level 21
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âpm list packages -3 com.emn8.mobilem8.nativeapp.bkâ
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âam force-stop com.emn8.mobilem8.nativeapp.bkâ
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âpm clear com.emn8.mobilem8.nativeapp.bkâ
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to deviceâŚ
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 push âC:\Appium\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jarâ /data/local/tmp/
info: [debug] Pushing settings apk to deviceâŚ
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 install âC:\Appium\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apkâ
info: [debug] Pushing unlock helper app to deviceâŚ
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 install âC:\Appium\Appium\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 cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âps âuiautomatorââ
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell uiautomator runtest AppiumBootstrap.jar -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=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.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] [BOOTSTRAP] [debug] json loading complete.
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Waking up device if itâs not alive
info: [debug] Pushing command to appium work queue: [âwakeâ,{}]
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: {âstatusâ:0,âvalueâ:true}
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âdumpsys windowâ
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: {âstatusâ:0,âvalueâ:â/data/local/tmpâ}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: [âcompressedLayoutHierarchyâ,{âcompressLayoutâ:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {âcmdâ:âactionâ,âactionâ:âcompressedLayoutHierarchyâ,âparamsâ:{âcompressLayoutâ:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] Getting device API level
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âgetprop ro.build.version.sdkâ
info: [debug] [BOOTSTRAP] [debug] Returning result: {âstatusâ:0,âvalueâ:false}
info: [debug] Device is at API Level 21
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âam start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.emn8.mobilem8.nativeapp.bk/com.testfairy.sdk.activities.WelcomeActivityâ
info: [debug] Waiting for pkg âcom.emn8.mobilem8.nativeapp.bkâ and activity âcom.testfairy.sdk.activities.WelcomeActivityâ to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 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 f73e9a59-954a-44d3-960f-653afb851e47
info: â POST /wd/hub/session 303 9723.807 ms - 9
info: â GET /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47 {}
info: [debug] Responding to client with success: {âstatusâ:0,âvalueâ:{âplatformâ:âLINUXâ,âbrowserNameâ:ââ,âplatformVersionâ:â5.0.1â,âwebStorageEnabledâ:false,âtakesScreenshotâ:true,âjavascriptEnabledâ:true,âdatabaseEnabledâ:false,ânetworkConnectionEnabledâ:true,âlocationContextEnabledâ:false,âwarningsâ:{},âdesiredâ:{âappâ:âC:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apkâ,âplatformVersionâ:â5.0.1â,âbrowserNameâ:ââ,âplatformNameâ:âAndroidâ,âdeviceNameâ:âAndroidâ},âappâ:âC:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apkâ,âplatformNameâ:âAndroidâ,âdeviceNameâ:âAndroidâ},âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â GET /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47 200 4.346 ms - 691 {âstatusâ:0,âvalueâ:{âplatformâ:âLINUXâ,âbrowserNameâ:ââ,âplatformVersionâ:â5.0.1â,âwebStorageEnabledâ:false,âtakesScreenshotâ:true,âjavascriptEnabledâ:true,âdatabaseEnabledâ:false,ânetworkConnectionEnabledâ:true,âlocationContextEnabledâ:false,âwarningsâ:{},âdesiredâ:{âappâ:âC:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apkâ,âplatformVersionâ:â5.0.1â,âbrowserNameâ:ââ,âplatformNameâ:âAndroidâ,âdeviceNameâ:âAndroidâ},âappâ:âC:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apkâ,âplatformNameâ:âAndroidâ,âdeviceNameâ:âAndroidâ},âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â POST /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/element {âusingâ:âidâ,âvalueâ:âandroid:id/button1â}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: [âfindâ,{âstrategyâ:âidâ,âselectorâ:âandroid:id/button1â,âcontextâ:ââ,âmultipleâ:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {âcmdâ:âactionâ,âactionâ:âfindâ,âparamsâ:{âstrategyâ:âidâ,âselectorâ:âandroid:id/button1â,âcontextâ:ââ,âmultipleâ:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding android:id/button1 using ID with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=android:id/button1]
info: [debug] [BOOTSTRAP] [debug] Returning result: {âstatusâ:0,âvalueâ:{âELEMENTâ:â1â}}
info: [debug] Responding to client with success: {âstatusâ:0,âvalueâ:{âELEMENTâ:â1â},âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â POST /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/element 200 810.575 ms - 87 {âstatusâ:0,âvalueâ:{âELEMENTâ:â1â},âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â POST /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/element/1/click {âidâ:â1â}
info: [debug] Pushing command to appium work queue: [âelement:clickâ,{âelementIdâ:â1â}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {âcmdâ:âactionâ,âactionâ:âelement:clickâ,âparamsâ:{âelementIdâ:â1â}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: click
info: [debug] [BOOTSTRAP] [debug] Returning result: {âstatusâ:0,âvalueâ:true}
info: [debug] Responding to client with success: {âstatusâ:0,âvalueâ:true,âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â POST /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/element/1/click 200 915.979 ms - 76 {âstatusâ:0,âvalueâ:true,âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â GET /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/contexts {}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âcat /proc/net/unixâ
info: [debug] WEBVIEW_13564 mapped to pid 13564
info: [debug] Getting process name for webview
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âpsâ
info: [debug] Parsed pid: 13564 pkg: com.emn8.mobilem8.nativeapp.bk
info: [debug] from: u0_a232,13564,200,2032036,214384,ffffffff,00000000,S,com.emn8.mobilem8.nativeapp.bk
info: [debug] returning process name: com.emn8.mobilem8.nativeapp.bk
info: [debug] Available contexts:
info: [debug] [âWEBVIEW_com.emn8.mobilem8.nativeapp.bkâ]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.emn8.mobilem8.nativeapp.bk
info: [debug] Responding to client with success: {âstatusâ:0,âvalueâ:[âNATIVE_APPâ,âWEBVIEW_com.emn8.mobilem8.nativeapp.bkâ],âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â GET /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/contexts 200 197.983 ms - 127 {âstatusâ:0,âvalueâ:[âNATIVE_APPâ,âWEBVIEW_com.emn8.mobilem8.nativeapp.bkâ],âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â POST /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/context {ânameâ:âWEBVIEW_com.emn8.mobilem8.nativeapp.bkâ}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âcat /proc/net/unixâ
info: [debug] WEBVIEW_13564 mapped to pid 13564
info: [debug] Getting process name for webview
info: [debug] executing cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 shell âpsâ
info: [debug] Parsed pid: 13564 pkg: com.emn8.mobilem8.nativeapp.bk
info: [debug] from: u0_a232,13564,200,2037256,215160,ffffffff,00000000,S,com.emn8.mobilem8.nativeapp.bk
info: [debug] returning process name: com.emn8.mobilem8.nativeapp.bk
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.emn8.mobilem8.nativeapp.bk
info: [debug] [âWEBVIEW_com.emn8.mobilem8.nativeapp.bkâ]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.emn8.mobilem8.nativeapp.bk
info: [debug] Connecting to chrome-backed webview
info: [debug] Creating Chrome session
info: [debug] Set chromedriver binary as: C:\Appium\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: FOR /F âusebackq tokens=5â %a in (netstat -nao ^| findstr /R /C:"9515 "
) do (FOR /F âusebackqâ %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe
) do (IF NOT %b==ââ TASKKILL /F /PID %b))
info: [debug] No old chromedrivers seemed to exist
info: [debug] Spawning chromedriver with: C:\Appium\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] [CHROMEDRIVER] Starting ChromeDriver (v2.10.267521) on port 9515
Only local connections are allowed.
info: [debug] Making http request with opts: {âurlâ:âhttp://127.0.0.1:9515/wd/hub/session",âmethodâ:âPOSTâ,âjsonâ:{âsessionIdâ:null,âdesiredCapabilitiesâ:{âchromeOptionsâ:{âandroidPackageâ:âcom.emn8.mobilem8.nativeapp.bkâ,âandroidUseRunningAppâ:true,âandroidDeviceSerialâ:"0506931ad84a9331â}}}}
info: [debug] [CHROMEDRIVER STDERR] [0.003][SEVERE]: Could not bind socket to 127.0.0.1:9515
info: [debug] [CHROMEDRIVER] Port not available. ExitingâŚ
info: [debug] Chromedriver exited with code 1
info: [debug] Chromedriver exited unexpectedly
error: Chromedriver create session did not work. Status was 200 and body was {âsessionIdâ:â7e458ae9cf33a8b9a0db93ce38055f5câ,âstatusâ:13,âvalueâ:{âmessageâ:âunknown error: Chrome version must be >= 33.0.1750.0\n (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)â}}
info: [debug] Responding to client with error: {âstatusâ:13,âvalueâ:{âmessageâ:âAn unknown server-side error occurred while processing the command. (Original error: Did not get session redirect from Chromedriver)â,âorigValueâ:âDid not get session redirect from Chromedriverâ},âsessionIdâ:âf73e9a59-954a-44d3-960f-653afb851e47â}
info: â POST /wd/hub/session/f73e9a59-954a-44d3-960f-653afb851e47/context 500 893.767 ms - 280
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 cmd: C:\Users\bkbc011\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0506931ad84a9331 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: {âstatusâ:0,âvalueâ:âOK, shutting downâ}
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=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] Sent shutdown command, waiting for UiAutomator to stopâŚ
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 79.914
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
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
Error From Eclipse was the code is executed:
[NATIVE_APP, WEBVIEW_com.emn8.mobilem8.nativeapp.bk]
[NATIVE_APP, WEBVIEW_com.emn8.mobilem8.nativeapp.bk]
Exception in thread âmainâ org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: Did not get session redirect from Chromedriver) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 899 milliseconds
Build info: version: â2.43.1â, revision: â5163bceâ, time: â2014-09-10 16:27:33â
System info: host: âBKUSL-6QBN7W1â, ip: â172.17.63.87â, os.name: âWindows 7â, os.arch: âamd64â, os.version: â6.1â, java.version: â1.8.0_31â
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{app=C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, deviceName=Android, platform=LINUX, desired={app=C:\Users\bkbc011\Desktop\apk\bk-mobile-native-android-app-BKL-2.57.0-SNAPSHOT-aligned-testfairy-7.apk, platformVersion=5.0.1, browserName=, platformName=Android, deviceName=Android}, platformVersion=5.0.1, webStorageEnabled=false, locationContextEnabled=false, browserName=, takesScreenshot=true, javascriptEnabled=true, platformName=Android}]
Session ID: f73e9a59-954a-44d3-960f-653afb851e47
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:176)
at io.appium.java_client.AppiumDriver.context(AppiumDriver.java:532)
at hybridapp.main(hybridapp.java:53)