here is my configuration:
When I execute java on the CLI, I obtain a similar error as when executing from Eclipse ADK Bundle
java -jar selendroid-standalone-0.9.0-with-dependencies.jar -port 4444
or
java -jar selendroid-standalone-0.9.0-with-dependencies.jar -app selendroid-test-app-0.9.0.apk
Similar to the other poster, when I execute android.bat list avds, on the cli it completes successfully
C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
after 40 seconds as mentioned in other posts
Available Android Virtual Devices:
<nothing returns since I wish to test using a real mobile>
Here is the script I'm trying to validate with as an initial set...
This script was executes as-is w/minor path mod
/*
* Copyright 2012-2014 eBay Software Foundation and selendroid committers.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
import io.selendroid.SelendroidCapabilities;
import io.selendroid.SelendroidConfiguration;
import io.selendroid.SelendroidDriver;
import io.selendroid.SelendroidLauncher;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class SelendroidIntegrationTest {
private static SelendroidLauncher selendroidServer = null;
private static WebDriver driver = null;
@Test
public void testShouldBeAbleToEnterText() {
WebElement inputField = driver.findElement(By.id("my_text_field"));
inputField.sendKeys("Selendroid");
Assert.assertEquals("Selendroid", inputField.getText());
}
@BeforeClass
public static void startSelendroidServer() throws Exception {
if (selendroidServer != null) {
selendroidServer.stopSelendroid();
}
SelendroidConfiguration config = new SelendroidConfiguration();
config.addSupportedApp("src/selendroid-test-app-0.9.0.apk");
selendroidServer = new SelendroidLauncher(config);
selendroidServer.lauchSelendroid();
SelendroidCapabilities caps =
new SelendroidCapabilities("io.selendroid.testapp:0.9.0");
driver = new SelendroidDriver(caps);
}
@AfterClass
public static void stopSelendroidServer() {
if (driver != null) {
driver.quit();
}
if (selendroidServer != null) {
selendroidServer.stopSelendroid();
}
}
}
here is the error displayed by the Eclipse SDK Bundle:
Apr 03, 2014 1:37:09 PM io.selendroid.SelendroidLauncher lauchServer
INFO: Starting selendroid-server port 4444
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/MANIFEST.MF
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/CERT.RSA
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/CERT.SF
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/ANDROIDD.SF
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk META-INF/ANDROIDD.RSA
Apr 03, 2014 1:37:10 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Java\jdk1.7.0_51\bin\jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk -storepass android -keystore C:\Users\ele\.android\debug.keystore C:\ADKB\workspace\CMDS WebTest\src\selendroid-test-app-0.9.0.apk androiddebugkey
Apr 03, 2014 1:37:11 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: App signing output: jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2041-08-15) or after any future revocation date.
Apr 03, 2014 1:37:11 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe dump badging C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe dump badging C:\ADKB\workspace\CMDS WebTest\src\resigned-selendroid-test-app-0.9.0.apk
Apr 03, 2014 1:37:11 PM io.selendroid.server.model.SelendroidStandaloneDriver initApplicationsUnderTest
INFO: App io.selendroid.testapp:0.9.0 has been added to selendroid standalone server.
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/MANIFEST.MF
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/CERT.RSA
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/CERT.SF
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/ANDROIDD.SF
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\aapt.exe remove C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk META-INF/ANDROIDD.RSA
Apr 03, 2014 1:37:11 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\Program Files\Java\jdk1.7.0_51\bin\jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -signedjar C:\Users\ele\AppData\Local\Temp\resigned-android-driver9070064163513721178.apk -storepass android -keystore C:\Users\ele\.android\debug.keystore C:\Users\ele\AppData\Local\Temp\android-driver9070064163513721178.apk androiddebugkey
Apr 03, 2014 1:37:12 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: App signing output: jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2041-08-15) or after any future revocation date.
Apr 03, 2014 1:37:12 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: C:\Users\ele\AppData\Local\Temp\resigned-android-driver9070064163513721178.apk
Apr 03, 2014 1:37:12 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=0146B0651001E009, model=null, targetVersion=null]
Apr 03, 2014 1:37:12 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=0146B0651001E009, model=Galaxy Nexus, targetVersion=ANDROID17]
Apr 03, 2014 1:37:12 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=0146B0651001E009, model=Galaxy Nexus, targetVersion=ANDROID17]
Apr 03, 2014 1:37:12 PM io.selendroid.android.impl.DefaultDeviceManager initializeAdbConnection
INFO: my devices: null
Apr 03, 2014 1:37:12 PM io.selendroid.io.ShellCommand exec
INFO: executing command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
Apr 03, 2014 1:37:35 PM io.selendroid.SelendroidLauncher lauchServer
SEVERE: Error occurred while building server: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
io.selendroid.exceptions.AndroidDeviceException: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:113)
at io.selendroid.server.model.DeviceStore.initAndroidDevices(DeviceStore.java:110)
at io.selendroid.server.model.SelendroidStandaloneDriver.initAndroidDevices(SelendroidStandaloneDriver.java:162)
at io.selendroid.server.model.SelendroidStandaloneDriver.<init>(SelendroidStandaloneDriver.java:83)
at io.selendroid.server.SelendroidStandaloneServer.initializeSelendroidServer(SelendroidStandaloneServer.java:91)
at io.selendroid.server.SelendroidStandaloneServer.<init>(SelendroidStandaloneServer.java:65)
at io.selendroid.SelendroidLauncher.lauchServer(SelendroidLauncher.java:67)
at io.selendroid.SelendroidLauncher.lauchSelendroid(SelendroidLauncher.java:90)
at SelendroidIntegrationTest.startSelendroidServer(SelendroidIntegrationTest.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: io.selendroid.exceptions.ShellCommandException: An error occured while executing shell command: C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
at io.selendroid.io.ShellCommand.exec(ShellCommand.java:53)
at io.selendroid.android.impl.DefaultAndroidEmulator.listAvailableAvds(DefaultAndroidEmulator.java:111)
... 24 more
Caused by: io.selendroid.exceptions.ShellCommandException:
... 26 more
Dominik,
I had included that test in my original post and through I responded earlier in the day. May be is was a directed email to you?
I'm reposting to the group...
In this example I did not have any AVDs running.
When I manually started an AVD and then executed the command it correctly listed it.
I don't have a screen shot of this test handy.
Similar to the other poster, when I execute android.bat list avds, on the cli it completes successfully
C:\ADKB\adt-bundle-windows-x86_64-20140321\sdk\tools\android.bat list avds
after 40 seconds as mentioned in other posts
Available Android Virtual Devices:
<nothing returns since I wish to test using a real mobile>When I executed the example program started and actually started using this test apk.
java -jar selendroid-standalone-0.9.0-with-dependencies.jar -app selendroid-test-app-0.9.0.apk
My next test will be to try to execute a Selenium script that operates the android browser which is my real goal.
I'm still interested in debugging. The actual problem probably lies in the JAR that's executed in the .bat from the tmp directory. I may try to debug that given time....
Eric Edberg