Appium 1.3.1 and Selendroid issues

Hi There.
I’ve been attempting to run my app on 4.0 using selendroid.
The app works fine on 4.4.

Here are my steps:

  1. Running appium from source as of 2014-11-11 master.
  2. Used specifically: ‘’’ node . --selendroid-port 8080 ‘’’
  3. Used the following Desired capabilities:
[caps]
platformName = "Android"
platformVersion = "4.0"
deviceName = "Selendroid"
automationName = "Selendroid"
app = "./apps/android-learn-debug.apk"
appPackage = "com.blackboard.android.bbstudent"
appActivity = "com.blackboard.android.learn.navigation.activity.NavigationActivity"
  1. I start the test, the app initially launches, then I get an execution expired (Timeout::Error). Specifically appium’s log states:
info: [debug] Responding to client with error: {"status":7,"value":{"message":"An element could not be located on the page using the given search parameters.","origValue":"Element was not found.\nio.selendroid.exceptions.NoSuchElementException: Element was not found.\n\tat io.selendroid.server.handler.FindElement.handle(FindElement.java:58)\n\tat io.selendroid.server.AndroidServlet.handleRequest(AndroidServlet.java:301)\n\tat io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:67)\n\tat io.selendroid.server.http.ServerHandler.channelRead(ServerHandler.java:50)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)\n\tat io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)\n\tat io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:148)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:430)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:384)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)\n\tat io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)\n\tat java.lang.Thread.run(Thread.java:856)\n"},"sessionId":"f3efe001-cc30-8fc1-1273-9082c130e3b2"}
  1. Here is the ADB of our app under test.
11-12 22:37:27.010    5048-5082/com.blackboard.android.bbstudent I/System﹕ libcore.io.ErrnoException: kill failed: ESRCH (No such process)
            at libcore.io.Posix.kill(Native Method)
            at libcore.io.ForwardingOs.kill(ForwardingOs.java:77)
            at java.lang.ProcessManager$ProcessImpl.destroy(ProcessManager.java:257)
            at io.netty.util.internal.PlatformDependent.isRoot0(PlatformDependent.java:473)
            at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:63)
            at io.netty.util.Signal.<clinit>(Signal.java:31)
            at io.netty.util.concurrent.DefaultPromise.<clinit>(DefaultPromise.java:39)
            at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:35)
            at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:49)
            at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:61)
            at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:52)
            at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:44)
            at io.selendroid.server.http.HttpServer$1.run(HttpServer.java:48)

Then, this is repeating in my ADB ad nauseum.

11-12 22:37:27.445    5048-5091/com.blackboard.android.bbstudent W/ResourceType﹕ No known package when getting name for resource number 0xffffffff
  1. NOTE: My AndroidManifest.xml does indeed have this permission:

Any additional help most welcome. Let me know if this should go to github.
I also saw this, but not sure that it was the same:

Thanks in advance!
Eric

Hi Eric! Your error is not related to the issue that I posted, where the app doesn’t launch when using Selendroid. I’m pretty sure your error is that your test isn’t able to find an element – you can see this in the Appium log:

Element was not found.
io.selendroid.exceptions.NoSuchElementException: Element was not found

If you look at the lines in the log above this error, you should find which element the test tried to find that resulted in the Timeout::Error. It may be related to the different ways to find an element using Selendroid vs uiautomator. For example, you must use the entire id for uiautomator – MobileBy.id("com.blackboard.android.bbstudent:id/login_button") – vs just MobileBy.id("login_button") for Selendroid.

Let me know if this isn’t the case and I’ll try to help further :slight_smile:

Hi Ling
Thanks so much for the post!
Totally makes sense
I’ll let you know if I have any further questions
Thanks!
Eric

I am also getting same error.

I have used
WebElement inputField = driver.findElement(By.id(“io.selendroid.testapp:id/my_text_field”));

but still getting same error.

Please help.