Emulator is up and running, code looks like this (just want to load the app in the emulator)
java:
SelendroidCapabilities capa = new SelendroidCapabilities("io.selendroid.androiddriver:0.9.0");
WebDriver driver = new SelendroidDriver(capa);
in dos I ran:
java -jar selendroid-standalone-0.9.0-with-dependencies.jar -aut community311.apk
http://localhost:4444/wd/hub/status shows::
{"status":0,"value":{"supportedApps":[{"appId":"io.selendroid.androiddriver:0.9.0","mainActivity":"io.selendroid.androiddriver.WebViewActivity","basePackage":"io.selendroid.androiddriver"},{"appId":"com.opendata.android:0.0.1","mainActivity":"com.opendata.android.Property311","basePackage":"com.opendata.android"}],"os":{"arch":"amd64","name":"Windows
7","version":"6.1"},"build":{"browserName":"selendroid","version":"0.9.0"},"supportedDevices":[{"screenSize":"WVGA800","emulator":true,"androidTarget":"ANDROID19","avdName":"myApp"}]}}
Error I get when I run the java code:
Exception in thread "main"
org.openqa.selenium.SessionNotCreatedException: The requested
application under test is not configured in selendroid server.
io.selendroid.exceptions.SessionNotCreatedException: The requested
application under test is not configured in selendroid server.
at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:207)
at io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:42)
at io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:140)
at io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:70)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.PathMatchHandler.handleHttpRequest(PathMatchHandler.java:33)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.DateHeaderHandler.handleHttpRequest(DateHeaderHandler.java:21)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.ServerHeaderHandler.handleHttpRequest(ServerHeaderHandler.java:25)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:67)
at org.webbitserver.netty.NettyHttpChannelHandler$2.run(NettyHttpChannelHandler.java:72)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java -jar
selendroid-standalone-0.9.0-with-dependencies.jar -aut your-test.apk
Also be sure to insert the correct SelendroidCapabilities in your code which you can get after starting the server from http://localhost:4444/wd/hub/status
To install the Android USB driver on Windows 7 for the first time:
<sdk>\extras\google\usb_driver\
.)Or, to upgrade an existing Android USB driver on Windows 7 with the new driver:
<sdk>\extras\google\usb_driver\
.)To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/7d5a12ba-5343-4ff5-a22d-7fb8b93ad111%40googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "selendroid" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selendroid/Qm7Txfhm5WY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selendroid+...@googlegroups.com.
Visit this group at http://groups.google.com/group/selendroid.
May 12, 2014 4:31:51 PM io.selendroid.SelendroidLauncher lauchServer
INFO: Starting selendroid-server port 4444
May 12, 2014 4:31:51 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /home/xyz/Downloads/selendroid-test-app-0.9.0.apk
META-INF/MANIFEST.MF
May 12, 2014 4:31:51 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /home/xyz/Downloads/selendroid-test-app-0.9.0.apk
META-INF/CERT.RSA
May 12, 2014 4:31:51 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /home/xyz/Downloads/selendroid-test-app-0.9.0.apk
META-INF/CERT.SF
May 12, 2014 4:31:51 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /home/xyz/Downloads/selendroid-test-app-0.9.0.apk
META-INF/ANDROIDD.SF
May 12, 2014 4:31:51 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /home/xyz/Downloads/selendroid-test-app-0.9.0.apk
META-INF/ANDROIDD.RSA
May 12, 2014 4:31:52 PM io.selendroid.io.ShellCommand exec
INFO: executing command: /usr/lib/jvm/jdk1.7.0_10/bin/jarsigner -sigalg
MD5withRSA -digestalg SHA1 -signedjar
/home/xyz/Downloads/resigned-selendroid-test-app-0.9.0.apk -storepass
android -keystore /home/xyz/.android/debug.keystore
/home/xyz/Downloads/selendroid-test-app-0.9.0.apk androiddebugkey
May 12, 2014 4:31:53 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: App signing output:
May 12, 2014 4:31:53 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: /home/xyz/Downloads/resigned-selendroid-test-app-0.9.0.apk
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
dump badging /home/xyz/Downloads/resigned-selendroid-test-app-0.9.0.apk
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
dump badging /home/xyz/Downloads/resigned-selendroid-test-app-0.9.0.apk
May 12, 2014 4:31:53 PM io.selendroid.server.model.SelendroidStandaloneDriver initApplicationsUnderTest
INFO: App io.selendroid.testapp:0.9.0 has been added to selendroid standalone server.
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /tmp/android-driver8770458073547144060.apk META-INF/MANIFEST.MF
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /tmp/android-driver8770458073547144060.apk META-INF/CERT.RSA
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /tmp/android-driver8770458073547144060.apk META-INF/CERT.SF
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /tmp/android-driver8770458073547144060.apk META-INF/ANDROIDD.SF
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command:
/usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/build-tools/android-4.3/aapt
remove /tmp/android-driver8770458073547144060.apk META-INF/ANDROIDD.RSA
May 12, 2014 4:31:53 PM io.selendroid.io.ShellCommand exec
INFO: executing command: /usr/lib/jvm/jdk1.7.0_10/bin/jarsigner -sigalg
MD5withRSA -digestalg SHA1 -signedjar
/tmp/resigned-android-driver8770458073547144060.apk -storepass android
-keystore /home/xyz/.android/debug.keystore
/tmp/android-driver8770458073547144060.apk androiddebugkey
May 12, 2014 4:31:54 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: App signing output:
May 12, 2014 4:31:54 PM io.selendroid.builder.SelendroidServerBuilder signTestServer
INFO: The app has been signed: /tmp/resigned-android-driver8770458073547144060.apk
May 12, 2014 4:31:55 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=3c3f2f6d, model=null, targetVersion=null]
May 12, 2014 4:31:55 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=3c3f2f6d, model=GT-S7562, targetVersion=ANDROID15]
May 12, 2014 4:31:55 PM io.selendroid.server.model.DeviceStore addDevice
INFO: Adding: HardwareDevice [serial=3c3f2f6d, model=GT-S7562, targetVersion=ANDROID15]
May 12, 2014 4:31:55 PM io.selendroid.android.impl.DefaultDeviceManager initializeAdbConnection
INFO: my devices: null
May 12, 2014 4:31:55 PM io.selendroid.io.ShellCommand exec
INFO: executing command: /usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/tools/android list avds
May 12, 2014 4:31:58 PM io.selendroid.io.ShellCommand exec
INFO: executing command: /usr/local/adt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb devices
May 12, 2014 4:31:58 PM io.selendroid.server.model.DeviceStore addEmulators
INFO: Adding: AndroidEmulator [screenSize=480x800, targetPlatform=ANDROID17, serial=null, avdName=hack]
May 12, 2014 4:31:58 PM io.selendroid.server.model.DeviceStore addEmulators
INFO: Adding: AndroidEmulator [screenSize=768x1280, targetPlatform=ANDROID18, serial=null, avdName=droid]
May 12, 2014 4:31:58 PM io.selendroid.server.SelendroidStandaloneServer start
INFO: selendroid-standalone server has been started on port: 4444
FAILED CONFIGURATION: @BeforeClass startSelendroidServer
org.openqa.selenium.SessionNotCreatedException: Error occurred while starting selendroid-server on the device
io.selendroid.exceptions.SelendroidException: Error occurred while starting selendroid-server on the device
at io.selendroid.android.impl.AbstractDevice.startSelendroid(AbstractDevice.java:228)
at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:293)
at io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:42)
at io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:140)
at io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:70)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.PathMatchHandler.handleHttpRequest(PathMatchHandler.java:33)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.DateHeaderHandler.handleHttpRequest(DateHeaderHandler.java:21)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.ServerHeaderHandler.handleHttpRequest(ServerHeaderHandler.java:25)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:67)
at org.webbitserver.netty.NettyHttpChannelHandler$2.run(NettyHttpChannelHandler.java:72)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.Throwable: android.util.AndroidException:
INSTRUMENTATION_FAILED:
io.selendroid.com.xyz.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:586)
at com.android.commands.am.Am.run(Am.java:117)
at com.android.commands.am.Am.main(Am.java:80)
at com.android.internal.os.RuntimeInit.finishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:263)
at dalvik.system.NativeStart.main(Native Method)
Details:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation target package: com.xyz.android
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.com.xyz.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:586)
at com.android.commands.am.Am.run(Am.java:117)
at com.android.commands.am.Am.main(Am.java:80)
at com.android.internal.os.RuntimeInit.finishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:263)
at dalvik.system.NativeStart.main(Native Method)
Any help on this?
Regards.
To unsubscribe from this group and all its topics, send an email to selendroid+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/7d5a12ba-5343-4ff5-a22d-7fb8b93ad111%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "selendroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selendroid+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/CAOLJEvncCNeScWMXVGJgeQ4Arat8kUFUwAFdeeX1Y4JRB%2Bf74w%40mail.gmail.com.
Yes adb is able to recognize the device however, it says the following -
at io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:42)
at io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:140)
at io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:70)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.PathMatchHandler.handleHttpRequest(PathMatchHandler.java:33)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.DateHeaderHandler.handleHttpRequest(DateHeaderHandler.java:21)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.ServerHeaderHandler.handleHttpRequest(ServerHeaderHandler.java:25)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:67)
at org.webbitserver.netty.NettyHttpChannelHandler$2.run(NettyHttpChannelHandler.java:72)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.Throwable: android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.com.xyz.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:586)
at com.android.commands.am.Am.run(Am.java:117)
at com.android.commands.am.Am.main(Am.java:80)
at com.android.internal.os.RuntimeInit.finishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:263)
at dalvik.system.NativeStart.main(Native Method)
Details:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation target package: com.xyz.android
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.com.xyz.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:586)
at com.android.commands.am.Am.run(Am.java:117)
at com.android.commands.am.Am.main(Am.java:80)
at com.android.internal.os.RuntimeInit.finishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:263)
at dalvik.system.NativeStart.main(Native Method)
Any help on this?
Regards.
On Mon, May 12, 2014 at 7:06 PM, Ido <idris....@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "selendroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selendroid+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/CAOLJEvncCNeScWMXVGJgeQ4Arat8kUFUwAFdeeX1Y4JRB%2Bf74w%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "selendroid" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selendroid/Qm7Txfhm5WY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selendroid+...@googlegroups.com.
Visit this group at http://groups.google.com/group/selendroid.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/CAAHa76g8CTJbgZ6obmqtvZo6zxehGYDdo%2BnfCiRUuKsQM0hHMA%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/CAOLJEvnR_UavytqqSJvKaBAr4TVnEvfoMZL8uQbUX1eajnvXOw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/CAAHa76hE5vOCbxQfj7vNNDOH%2Bc8tfD8y0dToaOcfE2UYe%2BHacA%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/CAOLJEv%3D%3DZehS_uqLL7ie5EA0zzUVQ%3DtK50fs9RRy%3Db-mou8McQ%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/CAAHa76gD80Dc12%3DVXYnLL_SL%2BG-bTe0OodescLOYycpBXN63%3DA%40mail.gmail.com.
java -jar
selendroid-standalone-0.09.0-with-dependencies.jar -aut c:\apk\
test.apk
i Switched to command below and it works
java -jar selendroid-standalone-0.10.0-with-dependencies.jar
-app c:\apk\test
.apk
To view this discussion on the web, visit https://groups.google.com/d/msgid/selendroid/e6bebcfb-aa50-4dff-b211-2771b98f5f73%40googlegroups.com.
{"value":{"os":{"name":"Windows 7","arch":"x86","version":"6.1"},"build":{"browserName":"selendroid","version":"0.15.0"},
"supportedDevices":[{"emulator":true,"screenSize":"(320, 480)","avdName":"AVD","platformVersion":"19"}],
"supportedApps":[{"mainActivity":"io.selendroid.androiddriver.WebViewActivity","appId":"io.selendroid.androiddriver:0.15.0",
"basePackage":"io.selendroid.androiddriver"},{"mainActivity":"io.selendroid.testapp.HomeScreenActivity",
"appId":"io.selendroid.testapp:0.10.0","basePackage":"io.selendroid.testapp"}]},"status":0}
-----------------
After the server is started trying to execute code:
@BeforeClass
public static void startSelendroidServer() throws Exception
{
SelendroidCapabilities caps = new SelendroidCapabilities("io.selendroid.androiddriver:0.15.0");
dr = new SelendroidDriver(caps);
}
@Test
public void testShouldBeAbleToEnterText()
{
WebElement inputField = dr.findElement(By.id("my_text_field"));
inputField.sendKeys("Selendroid");
Assert.assertEquals("Selendroid", inputField.getText());
}
Shows the error/Exception message in Command prompt
SEVERE: Error occurred while starting Selendroid session
io.selendroid.server.common.exceptions.SessionNotCreatedException: The requested
application under test is not configured in selendroid server.
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.getA
ndroidApp(SelendroidStandaloneDriver.java:396)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.crea
teNewTestSession(SelendroidStandaloneDriver.java:221)
at io.selendroid.standalone.server.model.SelendroidStandaloneDriver.crea
teNewTestSession(SelendroidStandaloneDriver.java:210)
at io.selendroid.standalone.server.handler.CreateSessionHandler.handleRe
quest(CreateSessionHandler.java:40)
at io.selendroid.standalone.server.BaseSelendroidStandaloneHandler.handl
e(BaseSelendroidStandaloneHandler.java:45)
at io.selendroid.standalone.server.SelendroidServlet.handleRequest(Selen
droidServlet.java:131)
at io.selendroid.server.common.BaseServlet.handleHttpRequest(BaseServlet
.java:67)
at io.selendroid.server.common.http.ServerHandler.channelRead(ServerHand
ler.java:53)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abst
ractChannelHandlerContext.java:333)