Hello aim trying to run real device (Android S6 edge) in appuim tool
I follow these steps to setup the environment:
-Install JDK (jdk1.7.0_55)
-Install SDK (adt-bundle-windows-x86_64-20131030)
-Install Eclipse IDE for Java Developers Version: Luna Service Release 2 (4.4.2) Android SDK Manager (Android SDK Build-tools 24.4.1,23.1,20,19.1,19.0.3 / Extras Google USB Driver)
-Install Appium 1.2.0.1
-install node.js
-Install pdanet Desktop
-Install whats-app apk
Issue After user run TestNG test
- Code Fail to install whats-app apk and convert apk to 1457162839737.tmp
- pdanet Desktop return error message "Scoket close or error (code =10054)
code
import io.appium.java_client.android.AndroidDriver;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
public class Whatsapp {
@Test
public void testApp() throws MalformedURLException {
WebDriver dr;
File app = new File("C:\\DHA\\Workspace\\TestAppium\\Apk\\WhatsApp.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("deviceName", "Galaxy S6 edge");
capabilities.setCapability("platformVersion", "5.1.1");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("appPackage", "com.WhatsApp");
capabilities.setCapability("appActivity", "com.WhatsApp");
capabilities.setCapability("appWaitActivity", ".activities.SubActivity");
// capabilities.setCapability("appPackage", "com.whatsapp");
// capabilities.setCapability("appActivity", "com.whatsapp.Main");
dr = new AndroidDriver(new URL("http://192.168.1.14:4723/wd/hub"), capabilities);
dr.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
}
Log
Starting Node Server
info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5)
debug: Non-default server args: {“address”:“192.168.1.14”,“noReset”:true,“logNoColors”:true,“platformName”:“Android”,“platformVersion”:“18”,“automationName”:“Appium”}
info: Appium REST http interface listener started on 192.168.1.14:4723
info: LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“platformVersion”:“5.1.1”,“app”:“C:\DHA\Workspace\TestAppium\Apk\WhatsApp.apk”,“deviceName”:“Galaxy S6 edge”,“platformName”:“Android”,“browserName”:“”,“appActivity”:“com.WhatsApp”,“appWaitActivity”:“.activities.SubActivity”,“appPackage”:“com.WhatsApp”}}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {“desiredCapabilities”:{“platformVersion”:“5.1.1”,“app”:“C:\DHA\Workspace\TestAppium\Apk\WhatsApp.apk”,“deviceName”:“Galaxy S6 edge”,“platformName”:“Android”,“browserName”:“”,“appActivity”:“com.WhatsApp”,“appWaitActivity”:“.activities.SubActivity”,“appPackage”:“com.WhatsApp”}}
info: Starting android appium
debug: Using local app from desired caps: C:\DHA\Workspace\TestAppium\Apk\WhatsApp.apk
info: Retrieving device
debug: Creating new appium session c1c26f20-96a9-4c31-9dd2-83e4f524b897
debug: Using fast reset? false
debug: Preparing device for session
debug: Checking whether app is actually present
debug: Checking whether adb is present
debug: Using adb from C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe
debug: Trying to find a connected android device
debug: Getting connected devices…
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” devices
info: Found device adb server is out of date. killing…
debug: Setting device id to adb server is out of date. killing…
debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
wait-for-device
warn: code=OK, errno=OK, syscall=spawn
error: Error running wait-for-device
debug: Retrying restartAdb
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
kill-server
warn: code=OK, errno=OK, syscall=spawn
error: Error killing ADB server, going to see if it’s online anyway
debug: Getting connected devices…
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
devices
warn: code=OK, errno=OK, syscall=spawn
debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
wait-for-device
warn: code=OK, errno=OK, syscall=spawn
error: Error running wait-for-device
debug: Retrying restartAdb
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
kill-server
error: Error killing ADB server, going to see if it’s online anyway
warn: code=OK, errno=OK, syscall=spawn
debug: Getting connected devices…
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
devices
warn: code=OK, errno=OK, syscall=spawn
debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
wait-for-device
warn: code=OK, errno=OK, syscall=spawn
error: Error running wait-for-device
debug: Retrying restartAdb
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
kill-server
warn: code=OK, errno=OK, syscall=spawn
error: Error killing ADB server, going to see if it’s online anyway
debug: Getting connected devices…
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
devices
warn: code=OK, errno=OK, syscall=spawn
debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
wait-for-device
warn: code=OK, errno=OK, syscall=spawn
error: Error running wait-for-device
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
kill-server
warn: code=OK, errno=OK, syscall=spawn
error: Error killing ADB server, going to see if it’s online anyway
debug: Getting connected devices…
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
devices
warn: code=OK, errno=OK, syscall=spawn
debug: Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: “C:\Android\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe” -s adb server is out of date. killing…
wait-for-device
warn: code=OK, errno=OK, syscall=spawn
error: Error running wait-for-device
debug: Sent shutdown command, waiting for UiAutomator to stop…
warn: UiAutomator did not shut down fast enough, calling it gone
debug: Cleaning up android objects
debug: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: spawn OK
debug: Error: spawn OK
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
debug: Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: spawn OK)”,“code”:“OK”,“errno”:“OK”,“syscall”:“spawn”,“origValue”:“spawn OK”},“sessionId”:null}
Please Help ?