I am currently writing Automated UI tests using Selenium Webdriver and C# with the xUnit Assertion Library. I recently started looking into doing automation of Android devices using Selendroid and the documentation here for a starting ground.
Here is what I currently have
- A physical Android Device. Nexus 7
- Latest Android SDK and all updates as of 4/28/2015
- Latest Java JDK as of 4/28/2015
Everything was working just fine until 4/27/2015. Now, whenever I run a test it will get to the step of actually executing an action against an element on the page and fail.
An example of the test:
[Fact(DisplayName = "Android Tablet Test _ 01")]
public void AndroidTest01()
{
Driver.Navigate().GoToUrl("http://www.google.com");
var google_text_box = Driver.FindElement(By.CssSelector("input#lst-ib"));
google_text_box.Click();
}
Using Microsoft Visual Studios to debug it, I can see that google_text_box is declared and set just fine, but when I interact with it, it dies. Looking into the properties of google_text_box after it is set shows that .Selected threw the bellow exception which then prevents an further interactions.
CATCH_ALL: io.selendroid.server.common.exceptions.SelendroidException: {"message":"Element is not selectable"}
at io.selendroid.server.model.SelendroidWebDriver.executeAtom(SelendroidWebDriver.java:211)
at io.selendroid.server.model.SelendroidWebDriver.executeAtom(SelendroidWebDriver.java:179)
at io.selendroid.server.model.AndroidWebElement.isSelected(AndroidWebElement.java:150)
at io.selendroid.server.handler.GetElementSelected.safeHandle(GetElementSelected.java:37)
at io.selendroid.server.handler.SafeRequestHandler.handle(SafeRequestHandler.java:87)
at io.selendroid.server.AndroidServlet.handleRequest(AndroidServlet.java:264)
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.processSelectedKeysPlain(NioEventLoop.java:430)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:384)
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(Thread.java:818)
When the test is all done running the top stack is this:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.get_Selected()
It doesn't matter what kind of element I try to interact with (input, div, select) or how I find it (By.ID, By.CssSelector, By.Name) it keeps returning the same error. At this point I am stuck. I'm fairly new to writing automated tests, and C#, and the only one on my team testing the waters with Selendroid.
Thank you in advance for your time and input!