I'm testing an Android App and sometimes I can fill a field and sometimes not
This is the error: InvalidElementStateException: Message: Cannot set the element to '1'. Did you interact with the correct element?
Actually I'm using Input Text and xPath
InvalidElementStateException: Message: Cannot set the element to '1'. Did you interact with the correct element?
Stacktrace:
io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '1'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.setText(SendKeysToElement.java:87)
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:115)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:266)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:260)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(Abstra...
[ Message content over the limit has been removed. ]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:1012)
I'm expecting the code will work everytime