Open kishan-git opened 9 years ago
It would be helpful to capture any stacktrace that may exist in the logcat of the device related to the selendroid server app.
Hi Lukeis,
Attached is the logcat. logcat.txt
Hi Kishan,
I am pasting the steps to configure the selendroid. Hope this will help.
How to setup Selendroid: • JDK should be installed and JAVA_HOME path setup in your machine. • Android SDK should be installed on your machine and ANDROID_HOME should be setup in your machine • Download Selendroid from link: (https://github.com/selendroid/selendroid/releases) • Download Eclipse. • Add the selendroid jar to the eclipse. Right clicking on the Project --> Build Path --> Configure Build Path. Under Libraries tab, click Add Jars or Add External JARs and give the Jar.
Please refer this link for more information on setup: http://selendroid.io/setup.html
Getting an Application under test:
• CD to the folder where you downloaded the jar
• Copy the Android debug test app to the folder where selendroid jar is downloaded
Note: For completion purpose am using complainceTest_js app
• USB your device to PC with USB debugging enabled. Refer Appendix A for testing the device is Adb ready
• Open command prompt and navigate to the folder where selendroid jar is downloaded and run
java -jar
If this is correct and it is up and running, then you have to check for the device driver. Whether you have installed that driver in you computer to work with ADB. once it is done, then you can run you selendroid inspector command.
thanks for the logs, it looks like the code is trying to use the getView().getClass().getSimpleName() as a DOM xml node name, but the device restricts the characters of that name to only be a-z, A-Z and "_" (also "." in the middle, but not beginning character).
Looks like we need to take that into account that the simpleName may contain other characters that are valid in a class name... or just change the whole thing to not generate the xml tree on the device and send back json instead?
Thanks Lukeis for the reply. So can I expect this to come as a update in the next selendroid release.
Well, I identified the problem. Not sure of when it will be fixed :)
Thanks rajagondap for the detailed steps. I have already setup the selendroid and its running. Issue is only with element identifier. Check Lukeis comment.
Oh Ok. I am stuck because of this. Cannot proceed further. Is there any way to proceed further or any way I can identify the element identifiers for the APP.
you can try to use uiautomator viewer? or if it's a webview, you can use the adb plugin for chrome
Thanks Lukeis... Will keep this issue open .. and will be following this up....
Selendroid version : selendroid-standalone-0.17.0-with-dependencies Selendroid client version: selendroid-client-0.17.0
Device : Samsung Galaxy Note 2. API version 19. Android vesion 4.4.2.
Hi,
I am getting the below error when I hit the localhost:4444/inspector. The app is successully installed in the device and is launched. When I hit the above url in the browser I get the error and the inspector is not able to load the Tree Structure.
Command used to start : > java -jar selendroid-standalone-0.17.0-with-dependencies.jar -app -forceReinstall
Tried also without -forceReinstall, but same issue.
INFO: Got response value: {"value":{"supportedApps":[],"build":{"browserName":"selendroid","version":"0.17.0"},"os":{"arch":"armeabi-v7a","version":"19","name":"Andro Nov 15, 2015 1:20:53 PM io.selendroid.standalone.server.model.SelendroidStandaloneDriver waitForServerStart INFO: Selendroid server has started. Nov 15, 2015 1:21:08 PM io.selendroid.standalone.server.SelendroidServlet handleRequest INFO: new Inspector URL: http://localhost:4444/inspector/session/10d98df2-2065-f8b1-b193-49e7e8b4b3ef/ Nov 15, 2015 1:21:08 PM io.selendroid.standalone.server.handler.InspectorScreenshotHandler handleRequest INFO: inspector screenshot handler, sessionId: 10d98df2-2065-f8b1-b193-49e7e8b4b3ef Nov 15, 2015 1:21:10 PM io.selendroid.standalone.server.handler.InspectorTreeHandler handleRequest INFO: inspector tree handler, sessionId: 10d98df2-2065-f8b1-b193-49e7e8b4b3ef Nov 15, 2015 1:21:10 PM org.apache.http.impl.client.DefaultHttpClient tryExecute INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://localhost:8080: The target server failed to respond Nov 15, 2015 1:21:10 PM org.apache.http.impl.client.DefaultHttpClient tryExecute INFO: Retrying request to {}->http://localhost:8080 Nov 15, 2015 1:21:10 PM org.apache.http.impl.client.DefaultHttpClient tryExecute INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://localhost:8080: The target server failed to respond Nov 15, 2015 1:21:10 PM org.apache.http.impl.client.DefaultHttpClient tryExecute INFO: Retrying request to {}->http://localhost:8080 Nov 15, 2015 1:21:10 PM org.apache.http.impl.client.DefaultHttpClient tryExecute INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://localhost:8080: The target server failed to respond Nov 15, 2015 1:21:10 PM org.apache.http.impl.client.DefaultHttpClient tryExecute INFO: Retrying request to {}->http://localhost:8080 Nov 15, 2015 1:21:10 PM io.selendroid.standalone.server.handler.InspectorTreeHandler handleRequest SEVERE: Cannot get element tree for inspector org.apache.http.NoHttpResponseException: localhost:8080 failed to respond at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251) at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:197) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at io.selendroid.standalone.server.util.HttpClientUtil.executeRequest(HttpClientUtil.java:73) at io.selendroid.standalone.server.handler.InspectorTreeHandler.handleRequest(InspectorTreeHandler.java:67) at io.selendroid.standalone.server.BaseSelendroidStandaloneHandler.handle(BaseSelendroidStandaloneHandler.java:45) at io.selendroid.standalone.server.SelendroidServlet.handleRequest(SelendroidServlet.java:131) at io.selendroid.server.common.BaseServlet.handleHttpRequest(BaseServlet.java:67) at io.selendroid.server.common.http.ServerHandler.channelRead(ServerHandler.java:53) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.traffic.AbstractTrafficShapingHandler.channelRead(AbstractTrafficShapingHandler.java:223) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:148) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.lang.Thread.run(Unknown Source)
Nov 15, 2015 1:21:10 PM io.selendroid.standalone.server.SelendroidServlet handleRequest SEVERE: Error handling request io.selendroid.server.common.exceptions.SelendroidException: org.apache.http.NoHttpResponseException: localhost:8080 failed to respond at io.selendroid.standalone.server.handler.InspectorTreeHandler.handleRequest(InspectorTreeHandler.java:72) at io.selendroid.standalone.server.BaseSelendroidStandaloneHandler.handle(BaseSelendroidStandaloneHandler.java:45) at io.selendroid.standalone.server.SelendroidServlet.handleRequest(SelendroidServlet.java:131) at io.selendroid.server.common.BaseServlet.handleHttpRequest(BaseServlet.java:67) at io.selendroid.server.common.http.ServerHandler.channelRead(ServerHandler.java:53) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.traffic.AbstractTrafficShapingHandler.channelRead(AbstractTrafficShapingHandler.java:223) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:148) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.http.NoHttpResponseException: localhost:8080 failed to respond at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251) at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:197) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at io.selendroid.standalone.server.util.HttpClientUtil.executeRequest(HttpClientUtil.java:73) at io.selendroid.standalone.server.handler.InspectorTreeHandler.handleRequest(InspectorTreeHandler.java:67) ... 25 more